pg.ddx.io pgsql-odbc@postgresql.org mailing list archive
help / color / mirror / Atom feedRe: IIS Postgres ASP ADO - Problem
6+ messages / 3 participants
[nested] [flat]
* Re: IIS Postgres ASP ADO - Problem
@ 2005-08-01 13:27 Joel Fradkin <jfradkin@wazagua.com>
2005-08-01 17:14 ` Re: IIS Postgres ASP ADO - Problem Marko Ristola <Marko.Ristola@kolumbus.fi>
0 siblings, 1 reply; 6+ messages in thread
From: Joel Fradkin @ 2005-08-01 13:27 UTC (permalink / raw)
To: 'James Dornan' <james@catch22.com>; +Cc: pgsql-odbc
James,
The odbc is not working well for me (I can connect but get intermittent
issues of the IIS server locking up in regards to connectivity).
My understanding is the snapshot version is the best odbc out at this time.
Also can you connect via pgadmin (IE have the hba and config files set to
allow external connections)?
My conection is not using dsn, but I did get dsn to work in testing.
My dsnless string is
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=8190;Debug=0;CommLog=0;Optimizer=1;K
sqo=1;UseDeclareFetch=0;TextAsLongVarchar=1;UnknownsAsLongVarchar=0;BoolsAsC
har=1;Parse=0;CancelAsFreeStmt=0;ExtraSysTablePrefixes=dd_;LFConversion=1;Up
datableCursors=1;DisallowPremature=0;TrueIsMinus1=0;BI=0;ByteaAsLongVarBinar
y=0;UseServerSidePrepare=0"
My test using dsn used
Session("StringConn") ="DSN=postgresql;" & _
"UID=postgres;" & _
"PWD=;" & _
"Database=wazuni;"
asp code to use connection is :
dim Arec, Acmd, SQL ,AConn
set Arec = server.CreateObject("ADODB.Recordset")
Set AConn = Server.CreateObject("ADODB.CONNECTION")
set Acmd = server.CreateObject("ADODB.Command")
AConn.ConnectionTimeOut=30
AConn.commandtimeout=30
AConn.Open Session("StringConn")
For .net I use the npgsql .net objects.
Hope this helps you.
Joel Fradkin
-----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 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
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: IIS Postgres ASP ADO - Problem
2005-08-01 13:27 Re: IIS Postgres ASP ADO - Problem Joel Fradkin <jfradkin@wazagua.com>
@ 2005-08-01 17:14 ` Marko Ristola <Marko.Ristola@kolumbus.fi>
2005-08-01 17:37 ` Re: IIS Postgres ASP ADO - Problem Marko Ristola <Marko.Ristola@kolumbus.fi>
0 siblings, 1 reply; 6+ messages in thread
From: Marko Ristola @ 2005-08-01 17:14 UTC (permalink / raw)
To: Joel Fradkin <jfradkin@wazagua.com>; +Cc: James Dornan <james@catch22.com>; pgsql-odbc
I found a crashing problem during CONNECT into a database.
Here is the problem description:
Used Environment:
libpq-API under PostgreSQL 8.0.3
CVS HEAD of psqlodbc
libpq does have a problem with freeing memory, that has not been alloced
with malloc()!
Here is the problem (I don't know, wether the PostgreSQL CVS HEAD has a
fix for this):
postgresql-8.0.3/src/interfaces/libpq/fe-connect.c, function
conninfo_parse():
/* Make a working copy of PQconninfoOptions */
options = malloc(sizeof(PQconninfoOptions));
...
memcpy(options, PQconninfoOptions, sizeof(PQconninfoOptions));
Unfortunately PQconninfoOptions[] contains only char*val style pointers
instead of
char val[32] type character containers.
Because of this, the assumption, that memcpy() is enough to copy the
structure, is not
true anymore. You should NOT copy a static structure this way!
Working code would be something like this:
options = malloc(sizeof(PQconninfoOptions));
memcpy(options, PQconninfoOptions, sizeof(PQconninfoOptions));
for (i=0; PQconninfoOptions[i].val != NULL; i++) {
options[i].val = strdup(PQconninfoOptions[i].val);
... same for all other values
}
NULL termination.
Because of this, isql fails with me at the beginning, maybe because
dmalloc library, that I use for testing, discovered the problem.
Marko Ristola
Joel Fradkin wrote:
>James,
>
>The odbc is not working well for me (I can connect but get intermittent
>issues of the IIS server locking up in regards to connectivity).
>My understanding is the snapshot version is the best odbc out at this time.
>
>Also can you connect via pgadmin (IE have the hba and config files set to
>allow external connections)?
>
>My conection is not using dsn, but I did get dsn to work in testing.
>My dsnless string is
>
>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=8190;Debug=0;CommLog=0;Optimizer=1;K
>sqo=1;UseDeclareFetch=0;TextAsLongVarchar=1;UnknownsAsLongVarchar=0;BoolsAsC
>har=1;Parse=0;CancelAsFreeStmt=0;ExtraSysTablePrefixes=dd_;LFConversion=1;Up
>datableCursors=1;DisallowPremature=0;TrueIsMinus1=0;BI=0;ByteaAsLongVarBinar
>y=0;UseServerSidePrepare=0"
>
>My test using dsn used
>Session("StringConn") ="DSN=postgresql;" & _
> "UID=postgres;" & _
> "PWD=;" & _
> "Database=wazuni;"
>
>asp code to use connection is :
> dim Arec, Acmd, SQL ,AConn
> set Arec = server.CreateObject("ADODB.Recordset")
> Set AConn = Server.CreateObject("ADODB.CONNECTION")
> set Acmd = server.CreateObject("ADODB.Command")
> AConn.ConnectionTimeOut=30
> AConn.commandtimeout=30
> AConn.Open Session("StringConn")
>
>For .net I use the npgsql .net objects.
>
>Hope this helps you.
>
>Joel Fradkin
>
>
>
>
>-----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 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 2: Don't 'kill -9' the postmaster
>
>
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: IIS Postgres ASP ADO - Problem
2005-08-01 13:27 Re: IIS Postgres ASP ADO - Problem Joel Fradkin <jfradkin@wazagua.com>
2005-08-01 17:14 ` Re: IIS Postgres ASP ADO - Problem Marko Ristola <Marko.Ristola@kolumbus.fi>
@ 2005-08-01 17:37 ` Marko Ristola <Marko.Ristola@kolumbus.fi>
0 siblings, 0 replies; 6+ messages in thread
From: Marko Ristola @ 2005-08-01 17:37 UTC (permalink / raw)
To: Marko Ristola <Marko.Ristola@kolumbus.fi>; +Cc: Joel Fradkin <jfradkin@wazagua.com>; James Dornan <james@catch22.com>; pgsql-odbc
This was a false alarm:
it seems, that the problem that I try to search,
is not this one.
This one seems to work correctly.
I still try to understand, why free()
fails under conninfo_parse().
free() call, that fails, is called from conninfo_parse() directly,
and not within PQconninfoFree() as this one would have been.
Marko Ristola
Marko Ristola wrote:
>I found a crashing problem during CONNECT into a database.
>
>Here is the problem description:
>
>Used Environment:
>libpq-API under PostgreSQL 8.0.3
>CVS HEAD of psqlodbc
>
>libpq does have a problem with freeing memory, that has not been alloced
>with malloc()!
>
>Here is the problem (I don't know, wether the PostgreSQL CVS HEAD has a
>fix for this):
>
>postgresql-8.0.3/src/interfaces/libpq/fe-connect.c, function
>conninfo_parse():
>
> /* Make a working copy of PQconninfoOptions */
> options = malloc(sizeof(PQconninfoOptions));
>...
> memcpy(options, PQconninfoOptions, sizeof(PQconninfoOptions));
>
>Unfortunately PQconninfoOptions[] contains only char*val style pointers
>instead of
>char val[32] type character containers.
>Because of this, the assumption, that memcpy() is enough to copy the
>structure, is not
>true anymore. You should NOT copy a static structure this way!
>
>Working code would be something like this:
>
>options = malloc(sizeof(PQconninfoOptions));
>memcpy(options, PQconninfoOptions, sizeof(PQconninfoOptions));
>for (i=0; PQconninfoOptions[i].val != NULL; i++) {
> options[i].val = strdup(PQconninfoOptions[i].val);
> ... same for all other values
>}
>NULL termination.
>
>
>
>Because of this, isql fails with me at the beginning, maybe because
>dmalloc library, that I use for testing, discovered the problem.
>
>Marko Ristola
>
>
>Joel Fradkin wrote:
>
>
>
>>James,
>>
>>The odbc is not working well for me (I can connect but get intermittent
>>issues of the IIS server locking up in regards to connectivity).
>>My understanding is the snapshot version is the best odbc out at this time.
>>
>>Also can you connect via pgadmin (IE have the hba and config files set to
>>allow external connections)?
>>
>>My conection is not using dsn, but I did get dsn to work in testing.
>>My dsnless string is
>>
>>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=8190;Debug=0;CommLog=0;Optimizer=1;K
>>sqo=1;UseDeclareFetch=0;TextAsLongVarchar=1;UnknownsAsLongVarchar=0;BoolsAsC
>>har=1;Parse=0;CancelAsFreeStmt=0;ExtraSysTablePrefixes=dd_;LFConversion=1;Up
>>datableCursors=1;DisallowPremature=0;TrueIsMinus1=0;BI=0;ByteaAsLongVarBinar
>>y=0;UseServerSidePrepare=0"
>>
>>My test using dsn used
>>Session("StringConn") ="DSN=postgresql;" & _
>> "UID=postgres;" & _
>> "PWD=;" & _
>> "Database=wazuni;"
>>
>>asp code to use connection is :
>> dim Arec, Acmd, SQL ,AConn
>> set Arec = server.CreateObject("ADODB.Recordset")
>> Set AConn = Server.CreateObject("ADODB.CONNECTION")
>> set Acmd = server.CreateObject("ADODB.Command")
>> AConn.ConnectionTimeOut=30
>> AConn.commandtimeout=30
>> AConn.Open Session("StringConn")
>>
>>For .net I use the npgsql .net objects.
>>
>>Hope this helps you.
>>
>>Joel Fradkin
>>
>>
>>
>>
>>-----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 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 2: Don't 'kill -9' the postmaster
>>
>>
>>
>>
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 2: Don't 'kill -9' the postmaster
>
>
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: IIS Postgres ASP ADO - Problem
@ 2005-08-01 20:44 Joel Fradkin <jfradkin@wazagua.com>
2005-08-01 21:28 ` Re: IIS Postgres ASP ADO - Problem Greg Campbell <greg.campbell@us.michelin.com>
0 siblings, 1 reply; 6+ messages in thread
From: Joel Fradkin @ 2005-08-01 20:44 UTC (permalink / raw)
To: 'James Dornan' <james@catch22.com>; +Cc: pgsql-odbc
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@catch22.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@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.
>
>
>
>
>-----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 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
>
>
>
>
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: IIS Postgres ASP ADO - Problem
2005-08-01 20:44 Re: IIS Postgres ASP ADO - Problem Joel Fradkin <jfradkin@wazagua.com>
@ 2005-08-01 21:28 ` Greg Campbell <greg.campbell@us.michelin.com>
0 siblings, 0 replies; 6+ messages in thread
From: Greg Campbell @ 2005-08-01 21:28 UTC (permalink / raw)
To: Joel Fradkin <jfradkin@wazagua.com>; +Cc: James Dornan <james@catch22.com>; pgsql-odbc
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@catch22.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@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.
>>
>>
>>
>>
>>-----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 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@postgresql.org so that your
> message can get through to the mailing list cleanly
Attachments:
greg.campbell.vcf (text/x-vcard, 239B) download
begin:vcard
fn:Greg Campbell
n:Campbell;Greg
org:Michelin North America - US5 Lexington;ENG-ASE
email;internet:greg.campbell@us.michelin.com
title:ASE Systems Engineer
tel;work:803-951-5561/x75561
x-mozilla-html:FALSE
version:2.1
end:vcard
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: IIS Postgres ASP ADO - Problem
@ 2005-08-02 13:41 Joel Fradkin <jfradkin@wazagua.com>
0 siblings, 0 replies; 6+ messages in thread
From: Joel Fradkin @ 2005-08-02 13:41 UTC (permalink / raw)
To: 'James Dornan' <james@catch22.com>; 'Greg Campbell' <greg.campbell@us.michelin.com>; +Cc: 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@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.
-----Original Message-----
From: James Dornan [mailto:james@catch22.com]
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
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@catch22.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@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.
>>>
>>>
>>>
>>>
>>> -----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
>>> 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@postgresql.org so that your
>> message can get through to the mailing list cleanly
>
^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2005-08-02 13:41 UTC | newest]
Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-08-01 13:27 Re: IIS Postgres ASP ADO - Problem Joel Fradkin <jfradkin@wazagua.com>
2005-08-01 17:14 ` Marko Ristola <Marko.Ristola@kolumbus.fi>
2005-08-01 17:37 ` Marko Ristola <Marko.Ristola@kolumbus.fi>
2005-08-01 20:44 Re: IIS Postgres ASP ADO - Problem Joel Fradkin <jfradkin@wazagua.com>
2005-08-01 21:28 ` Greg Campbell <greg.campbell@us.michelin.com>
2005-08-02 13:41 Re: IIS Postgres ASP ADO - Problem Joel Fradkin <jfradkin@wazagua.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox