Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 74563476109 for ; Mon, 7 Oct 2002 17:19:29 -0400 (EDT) Received: from corvette.mascari.com (dhcp065-024-158-068.columbus.rr.com [65.24.158.68]) by postgresql.org (Postfix) with ESMTP id 57850476699 for ; Mon, 7 Oct 2002 17:19:14 -0400 (EDT) Received: from mascari.com (ferrari.mascari.com [192.168.2.1]) by corvette.mascari.com (8.9.3/8.9.3) with ESMTP id RAA02520 for ; Mon, 7 Oct 2002 17:18:27 -0400 Message-ID: <3DA1FA19.8020705@mascari.com> Date: Mon, 07 Oct 2002 17:18:17 -0400 From: Mike Mascari User-Agent: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0 X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-odbc@postgresql.org Subject: Re: Lotus Domino Server/Enterprise Connection Services References: <3DA0E540.9070901@mascari.com> X-Enigmail-Version: 0.63.3.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-MailScanner: Found to be clean X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200210/43 X-Sequence-Number: 2128 I wrote: > Hi all. > > Has anyone successfully configured Lotus Domino Server R6 beta to > correctly connect to PostgreSQL via ODBC and the Enterprise Connection > Services interface? and > However, the R6 server returns garbage instead of legitimate > data. I suspect the server may be anticipating UCS-2 data, although I > didn't have enough time to play around with his configuration. I've compared the SQL trace log of Lotus Domino Server accessing a Microsoft Access database using DECS/ODBC vs. accessing a PostgreSQL database using DECS/ODBC. The main difference which is prohibiting Lotus Domino Server from connecting to a PostgreSQL database is the data type of the meta data. When Domino Server examines data using the Access ODBC driver, it calls SQLTables() followed by SQLDescribeCol(). SQLDescribeCol() returns a value of 12 (SQL_VARCHAR) for the data type of the metadata (like table names or column names), whereas the PostgreSQL driver is returing a -1 (Who knows?) for the data type. This screws up Domino Server, since it doesn't know the data type of an ODBC meta data column like "TABLE_OWNER" or "TABLE_NAME". All I did to get Domino Server to work correctly with PostgreSQL is add the line: if ((*pfSqlType) == -1) (*pfSqlType) = SQL_VARCHAR; in results.c right after pgtype_to_concise_type() is called. I know it's a hack, but I thought whoever is maintaining the driver would like to know. Comments? Mike Mascari mascarm@mascari.com