bug: DELETE OR UPDATE EMPTY TABLE in VFP - Mailing list pgsql-odbc

From freeman
Subject bug: DELETE OR UPDATE EMPTY TABLE in VFP
Date
Msg-id 0HQA0095SDJIMH@mmp4.fz.fj.cn
Whole thread Raw
List pgsql-odbc
  SERVER: MANDRIKE LINUX 8.1 + POSTGRESQL-7.4
  CLIENT: WIN98+VFP8.0
  ODBC:   PSQLODBC 7.03.02 (2003/10/22)

  PROBLEM: WHEN DELETE OR UPDATE A EMPTY TABLE VIA "SQLEXEC" IN VFP8, IT RETURN A ERROR.
--------------------------------------------------------------------------------------------
    TABLE:  MYTABLE, THERE IS A RECORD IN MYTABLE.
VFP> P_handle=SQLStringConnect("DRIVER={PostgreSQL};DATABASE=hotel;SERVER=192.168.1.1;PORT=5432;
          UID=hotel;PWD=hotel;A6=;A7=100;A8=4096;B0=254;B1=8190;BI=2;C2=dd_;;CX=1b503ab")
VFP> ?SqlExec(p_handle,"DELETE FROM MYTABEL")   -- mytable is not empty
     1  -- SUCCESS
VFP> ?SqlExec(p_handle, "DELETE FROM MYTABLE")  -- mytable is empty
    -1  -- FAILURE
VFP> AERROR(A_E)    -- GET ODBC ERROR
VFP> ?A_E(2)        -- SHOW ODBC ERROR
    Connectivity error: Unable to retrieve specific error information.  Driver is probably out of resources

----------------------------------------------------------------------------------------------
I don't know why?

It's a ODBC TRACE LOG  as below:
---------------------------------------------------------------------------
.......
vfp8            fffb7033-fffa7bd3    ENTER SQLExecDirect
        HSTMT               025D0998
        UCHAR *             0x017BF174 [      -3] "delete from mytable\ 0"
        SDWORD                    -3

vfp8            fffb7033-fffa7bd3    EXIT  SQLExecDirect  with return code 0 (SQL_SUCCESS)
        HSTMT               025D0998
        UCHAR *             0x017BF174 [      -3] "delete from mytable\ 0"
        SDWORD                    -3

vfp8            fffb7033-fffa7bd3    ENTER SQLNumResultCols
        HSTMT               025D0998
        SWORD *             0x00B4F740

vfp8            fffb7033-fffa7bd3    EXIT  SQLNumResultCols  with return code 0 (SQL_SUCCESS)
        HSTMT               025D0998
        SWORD *             0x00B4F740 (0)

vfp8            fffb7033-fffa7bd3    ENTER SQLMoreResults
        HSTMT               025D0998

vfp8            fffb7033-fffa7bd3    EXIT  SQLMoreResults  with return code 100 (SQL_NO_DATA_FOUND)
        HSTMT               025D0998

vfp8            fffb7033-fffa7bd3    ENTER SQLFreeStmt
        HSTMT               025D0998
        UWORD                        0 <SQL_CLOSE>

vfp8            fffb7033-fffa7bd3    EXIT  SQLFreeStmt  with return code 0 (SQL_SUCCESS)
        HSTMT               025D0998
        UWORD                        0 <SQL_CLOSE>

vfp8            fffb7033-fffa7bd3    ENTER SQLFreeStmt
        HSTMT               025D0998
        UWORD                        3 <SQL_RESET_PARAMS>

vfp8            fffb7033-fffa7bd3    EXIT  SQLFreeStmt  with return code 0 (SQL_SUCCESS)
        HSTMT               025D0998
        UWORD                        3 <SQL_RESET_PARAMS>

vfp8            fffb7033-fffa7bd3    ENTER SQLExecDirect
        HSTMT               025D0998
        UCHAR *             0x017BF174 [      -3] "delete from mytable\ 0"
        SDWORD                    -3

vfp8            fffb7033-fffa7bd3    EXIT  SQLExecDirect  with return code 100 (SQL_NO_DATA_FOUND)
        HSTMT               025D0998
        UCHAR *             0x017BF174 [      -3] "delete from mytable\ 0"
        SDWORD                    -3

vfp8            fffb7033-fffa7bd3    ENTER SQLNumResultCols
        HSTMT               025D0998
        SWORD *             0x00B4F740

vfp8            fffb7033-fffa7bd3    EXIT  SQLNumResultCols  with return code -1 (SQL_ERROR)
        HSTMT               025D0998
        SWORD *             0x00B4F740

        DIAG [S1010] [Microsoft][ODBC Driver Manager] Function sequence error (0)

vfp8            fffb7033-fffa7bd3    ENTER SQLCancel
        HSTMT               025D0998

vfp8            fffb7033-fffa7bd3    EXIT  SQLCancel  with return code 0 (SQL_SUCCESS)
        HSTMT               025D0998

vfp8            fffb7033-fffa7bd3    ENTER SQLErrorW
        HENV                026CFF48
        HDBC                025D0194
        HSTMT               025D0998
        WCHAR *             0x00B4E668 (NYI)
         SDWORD *            0x00B4F718
        WCHAR *             0x00B4E268
        SWORD                      512
        SWORD *             0x00B4F71C

vfp8            fffb7033-fffa7bd3    EXIT  SQLErrorW  with return code 100 (SQL_NO_DATA_FOUND)
        HENV                026CFF48
        HDBC                025D0194
        HSTMT               025D0998
        WCHAR *             0x00B4E668 (NYI)
         SDWORD *            0x00B4F718
        WCHAR *             0x00B4E268
        SWORD                      512
        SWORD *             0x00B4F71C

vfp8            fffb7033-fffa7bd3    ENTER SQLCancel
        HSTMT               025D0998

vfp8            fffb7033-fffa7bd3    EXIT  SQLCancel  with return code 0 (SQL_SUCCESS)
        HSTMT               025D0998

vfp8            fffb7033-fffa7bd3    ENTER SQLCancel
        HSTMT               025D0998

vfp8            fffb7033-fffa7bd3    EXIT  SQLCancel  with return code 0 (SQL_SUCCESS)
        HSTMT               025D0998

vfp8            fffb7033-fffa7bd3    ENTER SQLCancel
        HSTMT               025D0998

vfp8            fffb7033-fffa7bd3    EXIT  SQLCancel  with return code 0 (SQL_SUCCESS)
        HSTMT               025D0998

vfp8            fffb7033-fffa7bd3    ENTER SQLFreeStmt
        HSTMT               025D0998
        UWORD                        1 <SQL_DROP>

vfp8            fffb7033-fffa7bd3    EXIT  SQLFreeStmt  with return code 0 (SQL_SUCCESS)
        HSTMT               025D0998
        UWORD                        1 <SQL_DROP>

----------------------------------------------------------------------------------------




                    致
礼!

            freeman
            flhotel@public.xm.fj.cn


pgsql-odbc by date:

Previous
From: "Miguel Juan"
Date:
Subject: Re: Hiroshi leaves the psqlodc driver ?
Next
From: freeman
Date:
Subject: StatementHandle will be free automatically after you excute a update (delete) query that return 0 row affect.