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 C79C452D39 for ; Tue, 2 Aug 2005 10:40:03 -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 05047-03 for ; Tue, 2 Aug 2005 13:39:59 +0000 (GMT) Received: from vms040pub.verizon.net (vms040pub.verizon.net [206.46.252.40]) by svr1.postgresql.org (Postfix) with ESMTP id BF8E652CB5 for ; Tue, 2 Aug 2005 10:39:57 -0300 (ADT) Received: from jfradkin ([66.15.127.235]) by vms040.mailsrvcs.net (Sun Java System Messaging Server 6.2 HotFix 0.04 (built Dec 24 2004)) with ESMTPA id <0IKL00LKXKMJ56B5@vms040.mailsrvcs.net> for pgsql-odbc@postgresql.org; Tue, 02 Aug 2005 08:39:56 -0500 (CDT) Date: Tue, 02 Aug 2005 09:41:31 -0400 From: "Joel Fradkin" Subject: Re: IIS Postgres ASP ADO - Problem In-reply-to: <42EE9957.7060402@catch22.com> To: "'James Dornan'" , "'Greg Campbell'" Cc: Message-id: <004001c59767$e47892e0$797ba8c0@jfradkin> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: quoted-printable X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=2.866 tagged_above=0 required=5 tests=AWL, MSGID_DOLLARS X-Spam-Level: ** X-Archive-Number: 200508/18 X-Sequence-Number: 5657 Excellent, Glad that worked. I wrote a .net app to move from sqlserver to postgres (uses npgsql components rather then odbc). I also saw in the archive mention of dumping to deliminited data and = reading it directly into a database. Best of luck. Joel Fradkin =20 Wazagua, Inc. 2520 Trailmate Dr Sarasota, Florida 34243 Tel. 941-753-7111 ext 305 =20 jfradkin@wazagua.com www.wazagua.com Powered by Wazagua Providing you with the latest Web-based technology & advanced tools. C 2004. WAZAGUA, Inc. All rights reserved. WAZAGUA, Inc This email message is for the use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized = review, use, disclosure or distribution is prohibited. If you are not the = intended recipient, please contact the sender by reply email and delete and = destroy all copies of the original message, including attachments. =20 =20 -----Original Message----- From: James Dornan [mailto:james@catch22.com]=20 Sent: Monday, August 01, 2005 5:51 PM To: Greg Campbell Cc: Joel Fradkin; pgsql-odbc@postgresql.org Subject: Re: [ODBC] IIS Postgres ASP ADO - Problem It's working now. I went into regedit and removed everything about postgres under ODBC=20 and ODBCINST. Then re-installed the driver. The driver I had before was=20 from 8.0.3. I had tried intalling the ODBC driver before but this did=20 nothing. I also opened up the Postres registery setting to 'everyone' When I get more time I'll look into which change solved the problem.=20 Right now I'm happy that I will be able to use Postgres. Once the data=20 is moved from mdb files to Postgres, we'll start to move to Linux and = PHP! Thanks for all the help. Greg Campbell wrote: > Are we overlooking things? > =3D=3D=3D=3D=3D=3D=3D=3DJames = wrote:=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > Specified driver could not be loaded due to system error 998=20 > (PostgreSQL-libpq). > /test.asp, line 10 > > Here is line 10 > Set cn =3D CreateObject("ADODB.Connection") > =3D=3D=3D=3D=3D=3D=3Dend of James what wrote = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > Does this actually fail before you open the connection, just when=20 > creating a ADODB connection object?!. It shouldn't know anything about = > the driver at that point, cause you haven't told it what you want to=20 > connect to. > > Have you commented stuff out until it ceases to fail? > > I'd suspect a permission problem,...either IIS's account doesn't have=20 > permission to someplace/something on the system,... or PostgreSQL is=20 > rejecting the connection attempts from 127.0.0.1 for the account. But=20 > lets not jump to conclusions. The ODBC driver also might bot be "well=20 > uninstalled/reinstalled", but given what you've already done I doubt = it. > > Have you checked the IIS log (%win_system32%\logfiles\w3svc?) > Is PostgreSQL set to log failed/successful connections? > > I don't quite understand what it is trying to do when it is failing. > Is it actually failing on the Connection open. Have you tried a DSN?=20 > That could rule-in/out a connection string problem. > > > > > > > > > Joel Fradkin wrote: > >> I have not tried 2003 with 8.0.3 driver, but I did use 2003 with the = 7.4 >> driver, so you may want to grab that driver just to see if there is = any >> difference. >> >> Only other idea I might ask is how recent is your mdac stuff. >> Not sure it makes a difference, but might if adding server and trying = >> the >> 7.4 odbc drive don't help, but I am confused because your getting the = >> error >> before it is trying to use odbc, its erroring on the creation of the=20 >> object. >> What did the creation look like for the MDB? >> >> I use Set cConn =3D Server.CreateObject("ADODB.CONNECTION") >> Not sure if server. Makes any difference? >> At this point I don't think it knows anything about the connection=20 >> its just >> creating an object. >> >> It does not need the connection info until it is opened. >> Again I use this string for the connection (not dsn). >> Session("StringConn") =3D >> "DRIVER=3D{PostgreSQL};DATABASE=3Dwazagua;SERVER=3D192.168.123.121;PORT=3D= 5432;UID=3Dp >> >> ostgres;PWD=3D;ReadOnly=3D0;Protocol=3D6.4;FakeOidIndex=3D0;ShowOidColumn= =3D0;RowVersi >> >> oning=3D0;ShowSystemTables=3D0;ConnSettings=3D;Fetch=3D100;Socket=3D4096;= UnknownSizes=3D >> >> 0;MaxVarcharSize=3D254;MaxLongVarcharSize=3D16280;Debug=3D0;CommLog=3D0;O= ptimizer=3D1; >> >> Ksqo=3D1;UseDeclareFetch=3D0;TextAsLongVarchar=3D1;UnknownsAsLongVarchar=3D= 0;BoolsAs >> >> Char=3D1;Parse=3D0;CancelAsFreeStmt=3D0;ExtraSysTablePrefixes=3Ddd_;LFCon= version=3D1;U >> >> pdatableCursors=3D1;DisallowPremature=3D0;TrueIsMinus1=3D0;BI=3D0;ByteaAs= LongVarBina >> >> ry=3D0;UseServerSidePrepare=3D0" >> >> And I open it using cConn.Open Session("StringConn") >> Joel Fradkin >> =20 >> >> -----Original Message----- >> From: James Dornan [mailto:james@catch22.com] Sent: Monday, August=20 >> 01, 2005 4:13 PM >> To: Joel Fradkin >> Subject: Re: [SPAM Score: 3.1] RE: IIS Postgres ASP ADO - Problem >> >> >> I'm still in the same boat. ODBC does seem to work, but does not >> load when accessing from an ASP page under IIS 6. I'm trying to >> quickly convert an application from using MDB files to Postgres. >> I wrote a quick little VB script and it was able to access Postgres >> without complaint. But the ASP web pages are not able to load >> the Postgres ODBC drive. ASP can use ODBC to access MDB files. >> I'm not sure what part of IIS 6 prevents this. >> >> Sadly if I fail in this the company will not continue down the path >> of open source. >> >> Here is the error message I get. >> >> Microsoft OLE DB Provider for ODBC Drivers error '80004005' >> >> Specified driver could not be loaded due to system error 998=20 >> (PostgreSQL-libpq). >> >> /test.asp, line 10 >> >> Here is line 10 >> >> Set cn =3D CreateObject("ADODB.Connection") >> =20 >> >> Joel Fradkin wrote: >> >> >>> The stuff I send help you? >>> If not I did get help switching from 7.4 to 8.0 >>> Basically it told me to look in registry for where it points for the = >>> odbc >>> driver. >>> I had issues myself, eventually I removed everything and installed=20 >>> from the >>> odbc download (making sure there was no reference in the registry=20 >>> and no >>> psqlodbc.dll on the system. I then installed from the download menu = off >>> postgres.org site. It installed and worked. The I could install=20 >>> postgres >>> 8.0.3 (not using the odbc from it). Finally I ended up building my = own >>> psqlodbc.dll using the csv, but I am still using the 7.4 drivers for = my >>> production as my data base is SQLASCII with French chars in it and I = >>> have >> >> >> to >> >>> get it converted to Unicode to use the new drivers. >>> I have got Unicode databases and the latest drivers in test=20 >>> environments. >>> I can appreciate the frustration, I lost the odbc when I tried a=20 >>> commercial >>> driver for whatever reason my odbc got messed up and I spent most of = >>> the >> >> >> day >> >>> goofing around until the complete uninstall and just loading odbc=20 >>> seemed to >>> get working again. I had postgres on a different computer as well so = I >> >> >> could >> >>> see when the odbc started to work again, plus I already had working >>> connections etc. >>> What errors you getting? >>> >>> Joel Fradkin >>> >>> Wazagua, Inc. >>> 2520 Trailmate Dr >>> Sarasota, Florida 34243 >>> Tel. 941-753-7111 ext 305 >>> >>> jfradkin@wazagua.com >>> www.wazagua.com >>> Powered by Wazagua >>> Providing you with the latest Web-based technology & advanced tools. >>> C 2004. WAZAGUA, Inc. All rights reserved. WAZAGUA, Inc >>> This email message is for the use of the intended recipient(s) and = may >>> contain confidential and privileged information. Any unauthorized=20 >>> review, >>> use, disclosure or distribution is prohibited. If you are not the=20 >>> intended >>> recipient, please contact the sender by reply email and delete and=20 >>> destroy >>> all copies of the original message, including attachments. >>> >>> >>> >>> >>> -----Original Message----- >>> From: James Dornan [mailto:james@catch22.com] Sent: Sunday, July 31, = >>> 2005 4:44 PM >>> To: jfradkin@wazagua.com >>> Subject: IIS Postgres ASP ADO - Problem >>> >>> >>> I noticed more than a few post from you about trying to get Postgres = >>> working with ODBC. >>> I'm hoping that maybe you would share some of that information. I am = >>> running IIS under >>> windos 2003 server, and the latest(8.0.3) Postgres server on the=20 >>> same machine. I cannot >>> connect no matter what I do. I have tried everything. >>> >>> The funny part is that I'm not new to ODBC, or windows. I've worked=20 >>> with windows all >>> the time, but just can't figure this one out. I've tried using a=20 >>> connection string, a DSN, >>> reinstalling, IIS, Postgres, ODBC drivers, MDAC, Jet, and so on. I=20 >>> still >have the same problem. >>> The odbc drive and it's dependant DDLs are in the path. The=20 >>> permisions are wide open >>> (for testing this specific problem). >>> >>> Is there any insight you could shed on the dark world of windows and = >>> ODBC, where feed- >>> back is rare. >>> >>> Thanks for any help you can provide. >>> >>> -- James >>> >>> >>> >>> >> >> >> >> ---------------------------(end of = broadcast)--------------------------- >> TIP 1: if posting/reading through Usenet, please send an appropriate >> subscribe-nomail command to majordomo@postgresql.org so that = your >> message can get through to the mailing list cleanly >