Обсуждение: Lotus Domino Server/Enterprise Connection Services
Hi all. Has anyone successfully configured Lotus Domino Server R6 beta to correctly connect to PostgreSQL via ODBC and the Enterprise Connection Services interface? I'm asking for my brother, who has not had a problem talking to a PostgreSQL database using the Lotus Notes client, but cannot get the driver to work correctly with the R6 beta server using Connection Services. The Notes.Net site didn't reveal anyone who has had success using the ODBC driver with Domino Enterprise Connection Services. Specifically, the data comes back as garbage. I can see the queries in the the PostgreSQL server log made by the driver and all looks well. 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 tried the following combinations: IE->Lotus DECS R6beta on Windows 2000-> ODBC 07.02.0003->PostgreSQL 7.1 IE->Lotus DECS R6beta on Windows 2000-> ODBC 07.02.0003(Beta)->PostgreSQL 7.3betaR2 IE->Lotus DECS R6beta on Windows 2000-> ODBC 07.02.0003(Unicode Beta)->PostgreSQL 7.3betaR2 I didn't have time to build a SQL trace file. Hopefully my brother can send it to me. However, I was hoping someone has already jumped through the appropriate hoops and could post a recipe for succession. I'm sorry for the sparseness of the details and hope to have more soon... Mike Mascari mascarm@mascari.com
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
Mike Mascari wrote: > > 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 -1 is SQL_LONGVARCHAR. Hmm the driver has handled the char columns for the result of most catalog functions as PG_TYPE_TEXT and it seems to be the cause. I changed them to PG_TYPE_VARCHAR and put the binaries on http://w2422.nsk.ne.jp/~inoue/. Could you try the dll ? regards, Hiroshi Inoue http://w2422.nsk.ne.jp/~inoue/
Hiroshi Inoue wrote: > Mike Mascari wrote: >> >>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 > > > -1 is SQL_LONGVARCHAR. Hmm the driver has handled the > char columns for the result of most catalog functions > as PG_TYPE_TEXT and it seems to be the cause. I changed > them to PG_TYPE_VARCHAR and put the binaries on > http://w2422.nsk.ne.jp/~inoue/. > Could you try the dll ? Yes, I will. I poked around a little further. It seems Domino can't handle SQL_LONGVARCHAR, so just unchecking "Text as LongVarChar" allowed it to properly peruse the catalog. I'll also do some more rigorous testing as well... Thanks! Mike Mascari mascarm@mascari.com
I wrote: > Hiroshi Inoue wrote: > >>Mike Mascari wrote: >> >>>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 >> >> >>-1 is SQL_LONGVARCHAR. Hmm the driver has handled the >>char columns for the result of most catalog functions >>as PG_TYPE_TEXT and it seems to be the cause. I changed >>them to PG_TYPE_VARCHAR and put the binaries on >>http://w2422.nsk.ne.jp/~inoue/. >>Could you try the dll ? > > > Yes, I will. I poked around a little further. It seems Domino > can't handle SQL_LONGVARCHAR, so just unchecking "Text as > LongVarChar" allowed it to properly peruse the catalog. I'll > also do some more rigorous testing as well... Your DLL works nicely without having to disable "Text as LongVarChar", which makes sense. Thanks! Mike Mascari mascarm@mascari.com