Hi,
I am getting the data from the textbox , and here i want to verify whether it is a valid sql statement or not using c#.net , can any one suggest and send me the code .
many thanks.
SQL Query Validation
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Hiren SoniRank #694 · 3.5K reputationPosted Dec 30, 2009, 4:44 AM EST
praveen Reddy3 reputationPosted Dec 30, 2009, 8:05 PM EST
Here the user enters the sql statement from the textbox ,but i want to know whether it is valid sql statement or not . if it is valid then only i want to send it to the server. for example let us think the user enter the following in the textbox
select from usertable
then i have to validate the above query and say him that it was not valid one ,because it was not containing any column names, so here i requried how to validate it. so please can you send me the code to validate it using c#.net