Re: [gnome-db] Re: GdaParameter Status/Usage

>>>>Essentially, how should a command be formatted for parameter
>>>I suppose it should be using the "standard" (if there's any) for this.
>>>So far, I've seen many times, in different programs, that apps use
>>>%var%, but, of course, this may not be good for many DBMS, which may use
>>>that character for something else.
>>> So, thoughts on how to do it?
>> 	I've seen in COBOL/DB2 and Pro*C/Oracle they use ':' like in:
>> 		SELECT field1 FROM tbl1 WHERE field2 = :var1
>> 	'var1' is defined in the host language.
>yes, I was on crack when I said %..% was used, since I was thinking
>about Oracle, which is the DB which I've used the most, and which, as
>you say, uses :var.

Maybe the ":" nomenclature is quasi-standard in ESQL as I've seen it in 
products for JLT and Informix as well.

>So, if nobody thinks there can be problems with this :... thing, we'll
>go with this one.
>Anyway, first of all, we need a simple SQL parser:
>anyone volunteers? :-)

The unixODBC project has the SQP library which is a lexx/yacc based SQL 
parser for use in building ODBC drivers for non-SQL data sources.  They've 
broken in out of the entirity of unixODBC so that other 
application/projects can use it.

They also have the SQI library which is a light weight SQL engine for use 
with text files, it uses SQP.  Once upon a time KDE used SQI to access 
it's configuration files.  I don't know if this is true anymore as I'm now 
a GNOME bigot.

I don't know if any of this is applicable to GNOME-DB,  but I'd hate for 
anyone to spend time re-inventing the wheel.

Also, GNOME-DB ships with SQLlite (which I love) and that *obviously* must 
contain and SQL parser.  Maybe that could be broken out since it is 
"included" anyway.

Ximian GNOME, Evolution, LTSP, and RedHat Linux + LVM & XFS

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]