|
-
May 7th, 2007, 10:04 AM
#1
Thread Starter
Hyperactive Member
[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.
-
May 7th, 2007, 10:08 AM
#2
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.
-
May 7th, 2007, 10:46 AM
#3
Thread Starter
Hyperactive Member
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?
-
May 7th, 2007, 10:53 AM
#4
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.
-
May 7th, 2007, 10:04 PM
#5
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|