|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
run commands before SqlDataSource select?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. -- Show quote____________________________________ 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) ----------------------------------------------------------------------------------------------------------------------- "Sergei Shelukhin" <realg***@gmail.com> wrote in message news:1170256213.324734.280040@q2g2000cwa.googlegroups.com... > 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 > On Jan 31, 7:09 pm, "William \(Bill\) Vaughn"
<billvaRemoveT***@nwlink.com> wrote: 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... Show quote > Sure. Pick up the ConnectionString from the Settings and us it to run your > SqlCommand. > |
|||||||||||||||||||||||