X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 74B569DC9BE for ; Tue, 24 Jan 2006 09:25:16 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 93411-10 for ; Tue, 24 Jan 2006 09:25:19 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from Mail2.KONTENT.De (mail2.kontent.de [81.88.34.59]) by postgresql.org (Postfix) with ESMTP id 430639DC9C1 for ; Tue, 24 Jan 2006 09:25:12 -0400 (AST) Received: from jedi.behrens.de (p5085BF2B.dip0.t-ipconnect.de [80.133.191.43]) by Mail2.KONTENT.De (Postfix) with ESMTP id 886F1388373 for ; Tue, 24 Jan 2006 14:25:14 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by jedi.behrens.de (Postfix) with ESMTP id CDDBE22BE5 for ; Tue, 24 Jan 2006 14:25:13 +0100 (CET) Received: from jedi.behrens.de ([127.0.0.1]) by localhost (jedi [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 02245-09 for ; Tue, 24 Jan 2006 14:25:13 +0100 (CET) Received: from [192.168.150.239] (mac.behrens.de [192.168.150.239]) by jedi.behrens.de (Postfix) with ESMTP id 8E11B22BE4 for ; Tue, 24 Jan 2006 14:25:13 +0100 (CET) Mime-Version: 1.0 (Apple Message framework v623) In-Reply-To: <20060124121103.GA29043@soptik.pzkagis.cz> References: <1138056433.236326.34590@o13g2000cwo.googlegroups.com> <20060124121103.GA29043@soptik.pzkagis.cz> Content-Type: multipart/alternative; boundary=Apple-Mail-1-888123249 Message-Id: From: Lothar Behrens Subject: Re: Strange problem ? Date: Tue, 24 Jan 2006 14:25:13 +0100 To: pgsql-odbc@postgresql.org X-Mailer: Apple Mail (2.623) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.893 required=5 tests=[AWL=-0.104, URI_NOVOWEL=0.997] X-Spam-Score: 0.893 X-Spam-Level: X-Archive-Number: 200601/224 X-Sequence-Number: 7039 --Apple-Mail-1-888123249 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=ISO-8859-1; format=flowed Am 24.01.2006 um 13:11 schrieb Ludek Finstrle: >> I have two computers, each with SuSE 9.1 and unixODBC with psqlodbc >> 07.03.0200. > > Are you sure that both psqlODBC are same? Yes, at most. I copied the driver from my work notebook to the test box=20= - both are SuSE 9.1. I have compared the unixODBC version - 2.2.8. Had some trouble with the=20= psqlpdbcS.so file not on my test box, I also copied that file (for ODBCConfig) to my=20 testbox. As of that I have a test application (mentioned in my other posts=20 here), which works while doing the same test, my class wrapper may do some things different. I have=20 done a strace on the system calls for both and only find relevant differences in that my=20 application (wrapper) seems to hang. Today I will gather some API logs as of activating them in the driver.=20= But not in the next hour. I hope, which that I can get more information about the differences -=20 better than comparing code or the strace diffs. Is there a switch to activate the server side logging. Here are the differences in short: Dave's plain test: retcode =3D SQLSetStmtOption(hstmt_select, SQL_ATTR_CONCURRENCY,=20= SQL_CONCUR_ROWVER); if (retcode !=3D SQL_SUCCESS) dbError("SQLSetStmtOption()",=20 hstmt_select); =09 retcode =3D SQLSetStmtOption(hstmt_select, SQL_CURSOR_TYPE,=20 SQL_CURSOR_KEYSET_DRIVEN); if (retcode !=3D SQL_SUCCESS) dbError("SQLSetStmtOption()",=20 hstmt_select); =09 UCHAR buf6[] =3D "drop table regressiontest"; =09 retcode =3D SQLExecDirect(hstmt, buf6, sizeof(buf6)); if (retcode !=3D SQL_SUCCESS) dbError("SQLExecDirect()", hstmt); My wrappers code (AFTER calling SQLExecDirect(...)): const int ArraySize =3D 1; SQLUSMALLINT RowStatusArray[ArraySize]; // Set the array size to one. SQLSetStmtAttr(hstmt, SQL_ATTR_ROW_ARRAY_SIZE, (SQLPOINTER) = ArraySize,=20 0); =09 // Why this construct ?? SQLINTEGER csrType =3D SQL_CURSOR_KEYSET_DRIVEN; =09 SQLSetStmtAttr(hstmt, SQL_ATTR_CURSOR_TYPE, (SQLPOINTER) = csrType, 0); SQLSetStmtAttr(hstmt, SQL_ATTR_ROW_BIND_TYPE, = SQL_BIND_BY_COLUMN, 0); SQLSetStmtAttr(hstmt, SQL_ATTR_ROW_STATUS_PTR, RowStatusArray, = 0); Is there a problem, when I set the cursor type too last ? > >> After a lot of research, I found this message may be a cause: >> >> Test system (my program): Set SQL_CURSOR_TYPE as drivers.lie. = (Program >> hang) > > Don't you try dynamic cursor? I don't know the code very well but you > could find it in the code. Dave's sample works with KEYSET_DRIVEN cursors. > >> Any hints ? > > You could try 07_03_ENHANCED which Dave announced few days ago. > Will try that later. I wonder about that I get such problems. This is=20 because I think, I have the same drivers and so on. > Regards, > > Luf Regards, Lothar > > ---------------------------(end of=20 > broadcast)--------------------------- > TIP 2: Don't 'kill -9' the postmaster > > -- Lothar Behrens | Rapid Prototyping ... Rosmarinstr 3 |=09 40235 D=FCsseldorf | www.lollisoft.de --Apple-Mail-1-888123249 Content-Transfer-Encoding: quoted-printable Content-Type: text/enriched; charset=ISO-8859-1 Am 24.01.2006 um 13:11 schrieb Ludek Finstrle: I have two computers, each with SuSE 9.1 and unixODBC with psqlodbc 07.03.0200. Are you sure that both psqlODBC are same?=20 Yes, at most. I copied the driver from my work notebook to the test box - both are SuSE 9.1. I have compared the unixODBC version - 2.2.8. Had some trouble with the psqlpdbcS.so file not on my test box, I also copied that file (for ODBCConfig) to my testbox. As of that I have a test application (mentioned in my other posts here), which works while doing the same test, my class wrapper may do some things different. I have done a strace on the system calls for both and only find relevant differences in that my application (wrapper) seems to hang. Today I will gather some API logs as of activating them in the driver. But not in the next hour. I hope, which that I can get more information about the differences - better than comparing code or the strace diffs. Is there a switch to activate the server side logging. Here are the differences in short: Dave's plain test: retcode =3D SQLSetStmtOption(hstmt_select, SQL_ATTR_CONCURRENCY, SQL_CONCUR_ROWVER); 7676,0F0F,5050if (retcode !=3D SQL_SUCCESS) = dbError(8989,1313,1515"SQLSetStmtOption()", hstmt_select); =09 retcode =3D SQLSetStmtOption(hstmt_select, SQL_CURSOR_TYPE, SQL_CURSOR_KEYSET_DRIVEN); 7676,0F0F,5050if (retcode !=3D SQL_SUCCESS) = dbError(8989,1313,1515"SQLSetStmtOption()", hstmt_select); =09 UCHAR buf6[] =3D 8989,1313,1515"drop table regressiontest"; =09 retcode =3D SQLExecDirect(hstmt, buf6, 7676,0F0F,5050sizeof(buf6)); 7676,0F0F,5050if (retcode !=3D SQL_SUCCESS) dbError(8989,1313,1515"SQLExecDirect()", hstmt); My wrappers code (AFTER calling SQLExecDirect(...)): 7676,0F0F,5050const 7676,0F0F,5050int ArraySize =3D 0000,0000,FFFF1; SQLUSMALLINT RowStatusArray[ArraySize]; 2323,6E6E,2525// Set the array size to = one. SQLSetStmtAttr(hstmt, SQL_ATTR_ROW_ARRAY_SIZE, (SQLPOINTER) ArraySize, 0000,0000,FFFF0); =09 2323,6E6E,2525// Why this construct = ?? SQLINTEGER csrType =3D SQL_CURSOR_KEYSET_DRIVEN; =09 SQLSetStmtAttr(hstmt, SQL_ATTR_CURSOR_TYPE, (SQLPOINTER) = csrType, 0000,0000,FFFF0); SQLSetStmtAttr(hstmt, SQL_ATTR_ROW_BIND_TYPE, = SQL_BIND_BY_COLUMN, 0000,0000,FFFF0); SQLSetStmtAttr(hstmt, SQL_ATTR_ROW_STATUS_PTR, RowStatusArray, 0000,0000,FFFF0); Is there a problem, when I set the cursor type too last ? After a lot of research, I found this message may be a cause: Test system (my program): Set SQL_CURSOR_TYPE as drivers.lie. (Program hang) Don't you try dynamic cursor? I don't know the code very well but you could find it in the code. Dave's sample works with KEYSET_DRIVEN cursors. Any hints ? You could try 07_03_ENHANCED which Dave announced few days ago. Will try that later. I wonder about that I get such problems. This is because I think, I have the same drivers and so on. Regards, Luf Regards, Lothar ---------------------------(end of broadcast)--------------------------- TIP 2: Don't 'kill -9' the postmaster -- Lothar Behrens | Rapid Prototyping ... Rosmarinstr 3 |=09 40235 D=FCsseldorf | www.lollisoft.de --Apple-Mail-1-888123249--