Setting SQL parameter to data Adapter

sethindeed

Well-known member
Joined
Dec 31, 1969
Messages
118
Location
Montreal Canada
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
 
you can edit the command on the property or you can dim a new sqlcommand text
 
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.
 
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 !
 
Im not sure what DisposeCommand is but theres nothing about a dataadapter that prevents you from modifying it at runtime (ie. redefining its selectcommand).
 
Back
Top