Re: IIS Postgres ASP ADO - Problem

From: "Joel Fradkin" <jfradkin(at)wazagua(dot)com>
To: "'James Dornan'" <james(at)catch22(dot)com>, "'Greg Campbell'" <greg(dot)campbell(at)us(dot)michelin(dot)com>
Cc: <pgsql-odbc(at)postgresql(dot)org>
Subject: Re: IIS Postgres ASP ADO - Problem
Date: 2005-08-02 13:41:31
Message-ID: 004001c59767$e47892e0$797ba8c0@jfradkin
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

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

Wazagua, Inc.
2520 Trailmate Dr
Sarasota, Florida 34243
Tel. 941-753-7111 ext 305

jfradkin(at)wazagua(dot)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.

-----Original Message-----
From: James Dornan [mailto:james(at)catch22(dot)com]
Sent: Monday, August 01, 2005 5:51 PM
To: Greg Campbell
Cc: Joel Fradkin; pgsql-odbc(at)postgresql(dot)org
Subject: Re: [ODBC] IIS Postgres ASP ADO - Problem

It's working now.

I went into regedit and removed everything about postgres under ODBC
and ODBCINST. Then re-installed the driver. The driver I had before was
from 8.0.3. I had tried intalling the ODBC driver before but this did
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.
Right now I'm happy that I will be able to use Postgres. Once the data
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?
> ========James wrote:============
> Specified driver could not be loaded due to system error 998
> (PostgreSQL-libpq).
> /test.asp, line 10
>
> Here is line 10
> Set cn = CreateObject("ADODB.Connection")
> =======end of James what wrote ==============
>
> Does this actually fail before you open the connection, just when
> 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
> 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
> permission to someplace/something on the system,... or PostgreSQL is
> rejecting the connection attempts from 127.0.0.1 for the account. But
> lets not jump to conclusions. The ODBC driver also might bot be "well
> 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?
> 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
>> object.
>> What did the creation look like for the MDB?
>>
>> I use Set cConn = Server.CreateObject("ADODB.CONNECTION")
>> Not sure if server. Makes any difference?
>> At this point I don't think it knows anything about the connection
>> 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") =
>>
"DRIVER={PostgreSQL};DATABASE=wazagua;SERVER=192.168.123.121;PORT=5432;UID=p

>>
>>
ostgres;PWD=;ReadOnly=0;Protocol=6.4;FakeOidIndex=0;ShowOidColumn=0;RowVersi

>>
>>
oning=0;ShowSystemTables=0;ConnSettings=;Fetch=100;Socket=4096;UnknownSizes=

>>
>>
0;MaxVarcharSize=254;MaxLongVarcharSize=16280;Debug=0;CommLog=0;Optimizer=1;

>>
>>
Ksqo=1;UseDeclareFetch=0;TextAsLongVarchar=1;UnknownsAsLongVarchar=0;BoolsAs

>>
>>
Char=1;Parse=0;CancelAsFreeStmt=0;ExtraSysTablePrefixes=dd_;LFConversion=1;U

>>
>>
pdatableCursors=1;DisallowPremature=0;TrueIsMinus1=0;BI=0;ByteaAsLongVarBina

>>
>> ry=0;UseServerSidePrepare=0"
>>
>> And I open it using cConn.Open Session("StringConn")
>> Joel Fradkin
>>
>>
>> -----Original Message-----
>> From: James Dornan [mailto:james(at)catch22(dot)com] Sent: Monday, August
>> 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
>> (PostgreSQL-libpq).
>>
>> /test.asp, line 10
>>
>> Here is line 10
>>
>> Set cn = CreateObject("ADODB.Connection")
>>
>>
>> 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
>>> from the
>>> odbc download (making sure there was no reference in the registry
>>> 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
>>> 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
>>> environments.
>>> I can appreciate the frustration, I lost the odbc when I tried a
>>> 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
>>> 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(at)wazagua(dot)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.
>>>
>>>
>>>
>>>
>>> -----Original Message-----
>>> From: James Dornan [mailto:james(at)catch22(dot)com] Sent: Sunday, July 31,
>>> 2005 4:44 PM
>>> To: jfradkin(at)wazagua(dot)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
>>> 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
>>> with windows all
>>> the time, but just can't figure this one out. I've tried using a
>>> connection string, a DSN,
>>> reinstalling, IIS, Postgres, ODBC drivers, MDAC, Jet, and so on. I
>>> still >have the same problem.
>>> The odbc drive and it's dependant DDLs are in the path. The
>>> 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(at)postgresql(dot)org so that your
>> message can get through to the mailing list cleanly
>

Browse pgsql-odbc by date

  From Date Subject
Next Message Joel Fradkin 2005-08-02 13:42:43 Re: psqlODBC 08.00.0102 available for download
Previous Message Dave Page 2005-08-02 08:15:58 psqlODBC 08.00.0102 available for download