toad77

toad77

  • NA
  • 1
  • 0

How to Dynamically build SQL

Nov 4 2004 11:02 PM
I'm trying to dynamically build SQL statements in my VB .Net windows application based on user input. Just using parameters isn't good enough, because I don't know until run time what the where clause will look like at all, or even if there will be one. I tried dynamically setting the CommandText property of the SelectCommand of the data adapter while running, but I get an error. Should I scrap the data adapter all together and use SqlCommand? If so, can I still use a databound dataset, do I need a data reader instead or in addition to... Thanks for any help!