[q-lang-cvs] q/modules/odbc odbc.c,1.7,1.8
Brought to you by:
agraef
From: Albert G. <ag...@us...> - 2008-02-12 00:37:39
|
Update of /cvsroot/q-lang/q/modules/odbc In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv21221 Modified Files: odbc.c Log Message: work around some bugs with the MS Access ODBC driver which causes it to reject NULL and empty string parameter values Index: odbc.c =================================================================== RCS file: /cvsroot/q-lang/q/modules/odbc/odbc.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** odbc.c 11 Feb 2008 23:01:33 -0000 1.7 --- odbc.c 12 Feb 2008 00:37:23 -0000 1.8 *************** *** 218,222 **** db->argv[i].len = SQL_NTS; db->argv[i].buflen = strlen(s)+1; ! db->argv[i].prec = db->argv[i].buflen-1; db->argv[i].data.buf = s; db->argv[i].ptr = s; --- 218,225 ---- db->argv[i].len = SQL_NTS; db->argv[i].buflen = strlen(s)+1; ! /* FIXME: The prec value should actually be buflen-1 here, but the MS ! Access ODBC interface barks at these. Hopefully this doesn't mess ! things up with other ODBC drivers. */ ! db->argv[i].prec = db->argv[i].buflen; db->argv[i].data.buf = s; db->argv[i].ptr = s; *************** *** 241,245 **** db->argv[i].len = SQL_NULL_DATA; db->argv[i].buflen = 0; ! db->argv[i].prec = 0; db->argv[i].data.buf = NULL; db->argv[i].ptr = NULL; --- 244,251 ---- db->argv[i].len = SQL_NULL_DATA; db->argv[i].buflen = 0; ! /* FIXME: The prec value should actually be zero, but again MS Access ! doesn't seem to like zero values here. Hopefully this doesn't mess ! things up with other ODBC drivers. */ ! db->argv[i].prec = 1; db->argv[i].data.buf = NULL; db->argv[i].ptr = NULL; |