For Programmers: Free Programming Magazines  


Home > Archive > Visual Basic > October 2005 > SQL Parser









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author SQL Parser
Frank Rizzo

2005-10-27, 3:55 am

Is there a implementation somewhere (in VB preferably) of tokenizing an
SQL string into constituent pieces? I am not looking for complicated
SQL, just relatively simple stuff (select, update, delete, etc...)

Thanks.
GrandNagel

2005-10-27, 3:55 am

Frank Rizzo wrote:
> Is there a implementation somewhere (in VB preferably) of tokenizing an
> SQL string into constituent pieces? I am not looking for complicated
> SQL, just relatively simple stuff (select, update, delete, etc...)
>
> Thanks.


I went over this thoroughly a while back... the only thing I found were
the ComponentOne controls and although they offer a significant amount
of run-time user-interactive query design, they wouldn't do quite what
you're asking for. We wound up passing the statement to the DB and
examining the returned record set for field names, types, etc., using the
ADO and ADOX objects. That method along with a little old fashioned
roll your own string parsing should get you what you're after.

D.
Michael Cole

2005-10-28, 3:55 am

Frank Rizzo wrote:
> Is there a implementation somewhere (in VB preferably) of tokenizing
> an SQL string into constituent pieces? I am not looking for
> complicated SQL, just relatively simple stuff (select, update,
> delete, etc...)


You could try rolling your own...

http://users.skynet.be/wvdd2/Tokenizers/tokenizers.html

--
Regards,

Michael Cole


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2009 codecomments.com