X-Original-To: pgsql-odbc@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 08544474E5C for ; Mon, 10 Feb 2003 01:59:34 -0500 (EST) Received: from sd.tpf.co.jp (sd.tpf.co.jp [210.161.239.34]) by postgresql.org (Postfix) with SMTP id BC7B1474E53 for ; Mon, 10 Feb 2003 01:59:32 -0500 (EST) Received: (qmail 26118 invoked from network); 10 Feb 2003 06:59:32 -0000 Received: from unknown (HELO viscomail.tpf.co.jp) (100.0.0.108) by sd2.tpf-fw-c.co.jp with SMTP; 10 Feb 2003 06:59:32 -0000 Received: from tpf.co.jp (3d_note1 [126.0.1.61]) by viscomail.tpf.co.jp (8.8.8+Sun/8.8.8) with ESMTP id PAA08596; Mon, 10 Feb 2003 15:59:31 +0900 (JST) Message-ID: <3E474E6D.F2D7FAFC@tpf.co.jp> Date: Mon, 10 Feb 2003 16:02:05 +0900 From: Hiroshi Inoue X-Mailer: Mozilla 4.73 [ja] (Windows NT 5.0; U) X-Accept-Language: ja MIME-Version: 1.0 To: Giuliano Gavazzi Cc: pgsql-odbc@postgresql.org Subject: Re: psqlodbc and SQLFetch after SQLTables gives SQL_NO_DATA_FOUND References: Content-Type: text/plain; charset=iso-2022-jp Content-Transfer-Encoding: 7bit X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200302/47 X-Sequence-Number: 2665 Giuliano Gavazzi wrote: > > Dear list, > > I posted some time ago about a problem with retrieving table in > MSQuery on MacOSX using postgres 3.7.1 and psqlodbc-7.2.5 with > iODBC (iODBC-SDK-3.5.3). > > At the time I found, by snooping the TCP stream, that the SQLTables > function, that must be used by MSQuery to retrieve the table list, > did indeed return the tables, but for some reason MSQuery was unable > to get this data. > > Now I have enabled tracing and found where the failure is. Apparently > MSQ uses SQLFetch just after SQLTables to get the table list, this > SQLFetch fails by returning SQL_NO_DATA_FOUND. Here I have two > snippets from the traces of MSQ retrieving tables first using > OpenLink Postgres Lite driver (that succeeds) and then using psqlodbc > (that fails): > > 1) openlink driver: > > iODBC[Microsoft Query] ThID:A0000DEC ENTER SQLTables > > iODBC[Microsoft Query] ThID:A0000DEC EXIT SQLTables with return > code 0 (SQL_SUCCESS) > > Microsoft Query ThID:A0000DEC EXIT SQLTables with return code 0 > (SQL_SUCCESS) > HSTMT 0x01619a00 > CHAR* 00000000 "..." > SMALLINT -3536 > CHAR* 00000000 "..." > SMALLINT -18992 > CHAR* 00000000 "..." > SMALLINT 15056 > CHAR* 0x001c3fd8 "Table" Hmm, if it is "TABLE", it seems to work. OK I would change the driver to be insenitive about it. regards, Hiroshi Inoue http://www.geocities.jp/inocchichichi/psqlodbc/