Click here to Skip to main content
15,886,362 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi Tech Folks, I am developing a .net application in C# through which we will give a front end to the users where they will write a query and the result set is shown in a gridview table So i just want to know that how can i validate a oracle query/syntax from my end Kindly help me to get possible ways to validate this oracle query from my side
Posted
Comments
Maciej Los 17-Oct-14 3:16am    
It's bad idea to enable users to build and run queries...
Sinisa Hajnal 17-Oct-14 3:28am    
Bad idea! Create modules that allow users to specify WHAT they need. You should create the query based on their request. Otherwise you'll have to have very carefuly managed rights so that users cannot delete, drop and otherwise destroy data or the database. And additional validation so that no one can do one of those things even if somehow they get the rights (that is, that your app cannot do that).

Please, read my comment to the question.

I need to warn you about SQL Injection[^].

If you want to check if sql statement is correct or not, please have a look here:
http://stackoverflow.com/questions/5735791/parser-for-oracle-sql[^]
http://www.sqlparser.com/oracle-sql-parser.php[^]
 
Share this answer
 
Hi ,

Try using the SQL Parser from http://www.sqlparser.com/[^].

Its not free but they have a trial version available.

Thanks,
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900