sethindeed Posted February 10, 2003 Posted February 10, 2003 Was wondering. Suppose I define my dataAdapter as "Select * From mytable" with the data adapter wizard, is there a way to modify the SQL query so that my data adapter returns a new result set at RUNTIME ? thx Quote What I don't know keeps me excited...
wayko Posted February 10, 2003 Posted February 10, 2003 you can edit the command on the property or you can dim a new sqlcommand text Quote
Moderators Robby Posted February 10, 2003 Moderators Posted February 10, 2003 Look at the top section where .NET places all the design-time code, you can modify the Select statement there or simply create the dataAdapter at run-time. Quote Visit...Bassic Software
Leaders quwiltw Posted February 11, 2003 Leaders Posted February 11, 2003 Put a question mark in the SQL statement for the parameter, then at runtime add a parameter to the sqlcommand object. We're going down a similar path in this post if you're interested. http://www.xtremedotnettalk.com/showthread.php?s=&threadid=69500 Quote --tim
sethindeed Posted February 11, 2003 Author Posted February 11, 2003 Thanx guys. Suppose my dataadapter is referring to tblStuff in an access database. If I use DisposeCommand, can I refer to another table with the same dataadapter ? thx ! Quote What I don't know keeps me excited...
Leaders quwiltw Posted February 11, 2003 Leaders Posted February 11, 2003 I'm not sure what DisposeCommand is but there's nothing about a dataadapter that prevents you from modifying it at runtime (ie. redefining it's selectcommand). Quote --tim
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.