run commands before SqlDataSource select?

  • Thread starter Thread starter Sergei Shelukhin
  • Start date Start date
S

Sergei Shelukhin

Hi. Is there any way to run sql commands on the same connection that
SqlDataSource uses to select data before the select? Apaprt from
trying to build a multi-command CommandText.
Overriding the class would be ok but I can't find the way to do it
 
Sure. Pick up the ConnectionString from the Settings and us it to run your
SqlCommand.

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
 
On Jan 31, 7:09 pm, "William \(Bill\) Vaughn"

No, it's not what I mean. What I mean is on the same connection
instance/in the same session before the select command is issued.
I have to access MySQL thru ODBC and due to db setup I need to issue a
bunch of set something-charset commands right after I open a
connection so that the data would be retrieved normally. However I
can't find the way to do it with GridView cause it opens its own
connection internally...
 
Back
Top