Update of /cvsroot/htoolkit/HSQL/ODBC
In directory sc8-pr-cvs1:/tmp/cvs-serv740/ODBC
Modified Files:
HSQL.hsc
Log Message:
bugfix
Index: HSQL.hsc
===================================================================
RCS file: /cvsroot/htoolkit/HSQL/ODBC/HSQL.hsc,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** HSQL.hsc 27 Sep 2003 09:49:19 -0000 1.8
--- HSQL.hsc 4 Jan 2004 10:22:34 -0000 1.9
***************
*** 169,181 ****
pMsg <- mallocBytes 256
pTextLen <- malloc
! sqlGetDiagRec handleType handle 1 pState pNative pMsg 256 pTextLen
! state <- peekCString pState
free pState
- native <- peek pNative
free pNative
- msg <- peekCString pMsg
free pMsg
free pTextLen
! throwDyn (SqlError {seState=state, seNativeError=fromIntegral native, seErrorMsg=msg})
| otherwise = error (show res)
--- 169,185 ----
pMsg <- mallocBytes 256
pTextLen <- malloc
! res <- sqlGetDiagRec handleType handle 1 pState pNative pMsg 256 pTextLen
! e <- if res == (#const SQL_NO_DATA)
! then return SqlNoData
! else do
! state <- peekCString pState
! native <- peek pNative
! msg <- peekCString pMsg
! return (SqlError {seState=state, seNativeError=fromIntegral native, seErrorMsg=msg})
free pState
free pNative
free pMsg
free pTextLen
! throwDyn e
| otherwise = error (show res)
|