From: Matthew H. North <ctsmhn@cts.com>
To: pgsql-interfaces@postgresql.org
Subject: PsqlODBC on W2K conn. to PostgreSQL 7.0.2 on FreeBSD
Date: Thu, 19 Oct 2000 09:06:38 -0700
Message-ID: <GAEEKJDCHLDJJALCNALCAEODCDAA.ctsmhn@cts.com> (raw)
Hello,
I'm having a problem getting the PsqlODBC driver for Windows to talk to my
PostgreSQL 7.0.2 db. I have an ASP script that I'm executing on the Windows
machine, that uses VBScript to make a connection to the database via a
properly configured DSN, and do a SELECT:
<%
SET cnnDB = Server.CreateObject("ADODB.Connection")
cnnDB.ConnectionString = "Provider=MSDASQL; Driver={PostgreSQL};
Data Source=TESTDSN"
cnnDB.Open
strQuery = "SELECT * FROM orders WHERE orderid = 6407"
set rsInfo = cnnDB.Execute(strQuery)
%>
<html>
<head>
<title>asp db test</title>
</head>
<body>
Field count: <%=rsInfo.Fields.Count%><br>
Cache size: <%=rsInfo.CacheSize%><br>
<p>
<%
rsInfo.MoveFirst
Response.Write(rsInfo("userid"))
%>
</body>
</html>
This script works fine up until the first line in the second block of ASP:
rsInfo.MoveFirst. This causes the script to die, with the output being:
----
Field count: 10
Cache size: 1
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Driver Manager] Driver does not support this parameter
/db38.asp, line 17
----
Microsoft's KB doesn't say anything useful about error # 80004005 except in
relation to Oracle.
This error seems to come up any time I try to call any method in the
Recordset that tries to access the query results at all. The only
conclusion I've been able to come to is that this version of the PsqlODBC
driver (the latest - 6.50.0000) doesn't work with the 7.x versions of
PostgreSQL, although it specifically says in the documentation that this
version has fixes to make it work with 7.x.
Note that the number returned by the call to rsInfo.Fields.Count is correct
there are 10 fields in the table being queried. Furthermore, I have the
PsqlODBC driver logging to a file on the W2K machine and there are no errors
in that log. In fact, it appears to indicate that the query is successful:
conn=40186584, query='SELECT * FROM orders WHERE orderid = 6407'
[ fetched 1 rows ]
What's going on?
Matthew H. North
Software Engineer
CTSnet Internet Services
t (858) 637-3600
f (858) 637-3630
mailto:ctsmhn@cts.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: ctsmhn@cts.com
Subject: Re: PsqlODBC on W2K conn. to PostgreSQL 7.0.2 on FreeBSD
In-Reply-To: <GAEEKJDCHLDJJALCNALCAEODCDAA.ctsmhn@cts.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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