[q-lang-cvs] q/modules/odbc/examples odbc_examp.q,1.9,1.10
Brought to you by:
agraef
From: Albert G. <ag...@us...> - 2008-02-15 11:53:12
|
Update of /cvsroot/q-lang/q/modules/odbc/examples In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv25030 Modified Files: odbc_examp.q Log Message: make the sample database work with strictly ANSI-compliant RDBMS like MS Access Index: odbc_examp.q =================================================================== RCS file: /cvsroot/q-lang/q/modules/odbc/examples/odbc_examp.q,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** odbc_examp.q 12 Feb 2008 02:26:54 -0000 1.9 --- odbc_examp.q 15 Feb 2008 11:53:06 -0000 1.10 *************** *** 25,31 **** // connect to an existing MS access database (Windows) - // Uncomment this line to make the script work with MS Access. - //fields DESC = join "," (map (sprintf "\"%s\" %s") DESC); - /****************************************************************************/ --- 25,28 ---- *************** *** 41,44 **** --- 38,44 ---- def DB = catch report (odbc_connect CONNECT); + /* Determine the identifier quote char. */ + def QCH = bstr $ odbc_getinfo DB SQL_IDENTIFIER_QUOTE_CHAR; + /****************************************************************************/ *************** *** 95,99 **** (NAME,params DESC); ! fields DESC = join "," (map (sprintf "%s %s") DESC); params DESC = join "," (map (cst "?") DESC); --- 95,100 ---- (NAME,params DESC); ! fields DESC = join "," (map (sprintf FORMAT) DESC) ! where FORMAT = sprintf "%s%%s%s %%s" (QCH,QCH); params DESC = join "," (map (cst "?") DESC); |