[2.0] SQL syntactic checker
Hi,
I´d like to know if there is an easy approach as to make a Sql syntactic checker.
Basically ensure that sql queries are syntactally correct.
So that sb won´t try to write in,sth like:
"Select * froma table",...
I can only think of doing this via regular expressions. But would think this approach would be quite complicated.
Would sb know of any .dlls which would include this type of functionality??
Many Thanks,
Rauland.
Re: [2.0] SQL syntactic checker
While it is in Classic VB (and only checks Select statements), you may find the "formatter" function I wrote useful, as it does basic validation like that.. see the link in my signature.
Re: [2.0] SQL syntactic checker
Hi thanks for your reply,
I´ve been looking at your code. It seems great, but must admit I find it difficult to understand, as I do not know much Clasic VB.
Would approaching this same problem with regular expressions be a realistic approach?
Re: [2.0] SQL syntactic checker
Regular expressions would probably be better.. but I can't really help with that, as I haven't used them enough (you can probably find pre-written ones on the web tho).
If you want me to explain parts of my code (which I think is just string manipulation), I'm happy to do that.
Re: [2.0] SQL syntactic checker
If it is SQL server, you could use the SQLDMO as laid out here:
http://www.dotnetfun.com/CodeSnippet...0with%20SQLDMO