X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 6DC4152C95 for ; Fri, 15 Jul 2005 20:10:29 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 69093-03 for ; Fri, 15 Jul 2005 23:10:20 +0000 (GMT) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.204]) by svr1.postgresql.org (Postfix) with ESMTP id 5BD3352C19 for ; Fri, 15 Jul 2005 20:10:19 -0300 (ADT) Received: by wproxy.gmail.com with SMTP id i16so707531wra for ; Fri, 15 Jul 2005 16:10:22 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=SvPhj5SEmbwsKq4tHs9h+E5dK3G+yB628zojq8lVakt0q4mevLahO/jGmL1e89CYsisUK0reA7VcHfISsFUzk3uRlE2VE8KAWiz7AvdqWnzbZpDPsZ9U/hKJUMqs3eTGkfAjhIdIVv2BQdZbyMbcpCbBLXpC+GXCjH1jROZ8pqs= Received: by 10.54.34.67 with SMTP id h67mr594784wrh; Fri, 15 Jul 2005 16:10:22 -0700 (PDT) Received: by 10.54.137.10 with HTTP; Fri, 15 Jul 2005 16:10:22 -0700 (PDT) Message-ID: <9ffd866c0507151610411bf275@mail.gmail.com> Date: Fri, 15 Jul 2005 18:10:22 -0500 From: Amarsh M Reply-To: Amarsh M To: pgsql-odbc@postgresql.org Subject: MFC issues with ODBC Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.231 tagged_above=0 required=5 tests=RCVD_BY_IP, UPPERCASE_25_50 X-Spam-Level: X-Archive-Number: 200507/72 X-Sequence-Number: 5538 Hello, I have an issue with ODBC connectivity. I am using the latest version of PostGreSQL with VC++ and using ODBC to connect. I use the MFC object namely CRecordset to get the records from the DB, this code was working great when it was intially written a couple of months ago. I started to work on it again this week and the code doesnt work anymore, esp the CRecordset::Open method fails. A brief snippet of my code recordptr=3Dnew CRecordset(this); this->ExecuteSQL("insert into test values (3,'three');"); AfxMessageBox("Executed the statement"); ret=3Drecordptr->Open(CRecordset::snapshot,SQL.Trim(),CRecordset::none); In the above code the last line fails all others including executeSQL on the CDatabase object work fine. Also it gives no error message it just gives a blank message box. Upon looking into the code I found the crash was happening when it was trying to get a record, specifically in MoveNext(); function inside dbcore.cpp (which is a MS class). I cant make much of the log, but here is the actual failure part "Select project name from master;" is the SQL statement I am trying to execute and there is data in the table. Thanks in advance a14-ea0=09ENTER SQLPrepare=20 =09=09HSTMT 01742520 =09=09UCHAR * 0x013BDA40 [ -3] "Select projectname from ma= ster;\ 0" =09=09SDWORD -3 a14-ea0=09ENTER SQLPrepare=20 =09=09HSTMT 01742520 =09=09UCHAR * 0x00378E10 [ 31] "Select projectname from ma= ster;" =09=09SDWORD 31 a14-ea0=09EXIT SQLPrepare with return code 0 (SQL_SUCCESS) =09=09HSTMT 01742520 =09=09UCHAR * 0x00378E10 [ 31] "Select projectname from ma= ster;" =09=09SDWORD 31 a14-ea0=09EXIT SQLPrepare with return code 0 (SQL_SUCCESS) =09=09HSTMT 01742520 =09=09UCHAR * 0x013BDA40 [ -3] "Select projectname from ma= ster;\ 0" =09=09SDWORD -3 a14-ea0=09ENTER SQLExecute=20 =09=09HSTMT 01742520 a14-ea0=09ENTER SQLExecute=20 =09=09HSTMT 01742520 a14-ea0=09EXIT SQLExecute with return code 0 (SQL_SUCCESS) =09=09HSTMT 01742520 a14-ea0=09ENTER SQLNumResultCols=20 =09=09HSTMT 01742520 =09=09SWORD * 0x0037E97E a14-ea0=09EXIT SQLNumResultCols with return code 0 (SQL_SUCCESS) =09=09HSTMT 01742520 =09=09SWORD * 0x0037E97E (1) a14-ea0=09EXIT SQLExecute with return code 0 (SQL_SUCCESS) =09=09HSTMT 01742520 a14-ea0=09ENTER SQLNumResultCols=20 =09=09HSTMT 01742520 =09=09SWORD * 0x013BD7B8 a14-ea0=09EXIT SQLNumResultCols with return code 0 (SQL_SUCCESS) =09=09HSTMT 01742520 =09=09SWORD * 0x013BD7B8 (1) a14-ea0=09ENTER SQLDescribeCol=20 =09=09HSTMT 01742520 =09=09UWORD 1=20 =09=09UCHAR * 0x013BDB48=20 =09=09SWORD 256=20 =09=09SWORD * 0x0012EC3C =09=09SWORD * 0x013BDA98 =09=09SQLULEN * 0x013BDA9C =09=09SWORD * 0x013BDAA0 =09=09SWORD * 0x013BDAA2 a14-ea0=09EXIT SQLDescribeCol with return code 0 (SQL_SUCCESS) =09=09HSTMT 01742520 =09=09UWORD 1=20 =09=09UCHAR * 0x013BDB48 [ 11] "projectname" =09=09SWORD 256=20 =09=09SWORD * 0x0012EC3C (11) =09=09SWORD * 0x013BDA98 (-9) =09=09SQLULEN * 0x013BDA9C (200) =09=09SWORD * 0x013BDAA0 (0) =09=09SWORD * 0x013BDAA2 (1) a14-ea0=09ENTER SQLExtendedFetch=20 =09=09HSTMT 01742520 =09=09UWORD 1 =09=09SQLLEN 1 =09=09SQLULEN * 0x013BD840 =09=09UWORD * 0x013B8E58 a14-ea0=09EXIT SQLExtendedFetch with return code -1 (SQL_ERROR) =09=09HSTMT 01742520 =09=09UWORD 1 =09=09SQLLEN 1 =09=09SQLULEN * 0x013BD840 =09=09UWORD * 0x013B8E58 a14-ea0=09ENTER SQLErrorW=20 =09=09HENV 01741540 =09=09HDBC 017415E8 =09=09HSTMT 01742520 =09=09WCHAR * 0x0012E870 (NYI)=20 =09=09SDWORD * 0x0012EB44 =09=09WCHAR * 0x0012E470=20 =09=09SWORD 511=20 =09=09SWORD * 0x0012E934 a14-ea0=09EXIT SQLErrorW with return code 100 (SQL_NO_DATA_FOUND) =09=09HENV 01741540 =09=09HDBC 017415E8 =09=09HSTMT 01742520 =09=09WCHAR * 0x0012E870 (NYI)=20 =09=09SDWORD * 0x0012EB44 =09=09WCHAR * 0x0012E470=20 =09=09SWORD 511=20 =09=09SWORD * 0x0012E934 a14-ea0=09ENTER SQLFreeStmt=20 =09=09HSTMT 01742520 =09=09UWORD 1