PsqlODBC on W2K conn. to PostgreSQL 7.0.2 on FreeBSD
От | Matthew H. North |
---|---|
Тема | PsqlODBC on W2K conn. to PostgreSQL 7.0.2 on FreeBSD |
Дата | |
Msg-id | GAEEKJDCHLDJJALCNALCAEODCDAA.ctsmhn@cts.com обсуждение исходный текст |
Список | pgsql-interfaces |
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
В списке pgsql-interfaces по дате отправления: