DataAdapter SQL string at runtime

  • Thread starter Thread starter John
  • Start date Start date
J

John

Hi

How can I change sql command for a dataadpater at runtime? The reason I need
this is that sql syntax depends on the sorting and filtering options user
chooses and combinations are too many to add to dataadpater in dataset
designer at design time and its easier to cerate an sql dynamically instead.

Thanks

Regards
 
John said:
Hi

How can I change sql command for a dataadpater at runtime? The reason
I need this is that sql syntax depends on the sorting and filtering
options user chooses and combinations are too many to add to
dataadpater in dataset designer at design time and its easier to
cerate an sql dynamically instead.


You can change the DataAdapter's SelectCommand property at any time.


Armin
 
measekite said:
He didn't ask IF he can do it, he asked HOW to do it.

I didn't say "yes" or "no". That would've been the answer to IF. He asked
HOW to change the SQL command. I told him he can do it by changing the
SelectCommand property. As he has used the designer til now, this is the
right answer, I think. If not, he will let me know.


Armin
 
Back
Top