Environment:
=========
Windows 2000 server running IIS. This server is a domain controller. This server is runnning version 7.2.5 of the postgres odbc driver.
Debian Linux server running a postgres database
ASP script:
========
Function nugget_forum(column)
start_nugget column,"::Rumour Mill"
Set conn = CreateObject("adodb.connection")
conn.ConnectionString = "DRIVER={PostgreSQL};sERVER=10.11.2.5;port=5432;DATABASE=dbname;UID=uid;PWD=pwd;"
conn.Open
'Set rs = CreateObject("adodb.recordset")
'querystr = "SELECT * FROM ib_forum_posts;"
'rs.open querystr, conn,3,3
Conn.close
end_nugget(column)
end Function
script run under windows scripting host
==========================
When I run this script under windows scripting host I get a connection and am able to retrieve data.
Set conn = CreateObject("adodb.connection")
conn.ConnectionString = "DRIVER={PostgreSQL};sERVER=10.11.2.5;port=5432;DATABASE=dbname;UID=uid;PWD=pwd;"
conn.Open
Set rs = CreateObject("adodb.recordset")
querystr = "SELECT * FROM ib_forum_posts;"
rs.open querystr, conn,3,3
do while not rs.eof
wscript.echo rs.Fields(0).value & ":" & rs.Fields(1).value & ":" & rs.Fields(12).value
rs.MoveNext
loop
Conn.close
The error
=======
When I run the script in an ASP I get the following error.
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
/intranet/default.asp, line 35
Line 35 is the conn.open statement
I initally thought that this might be a permissions problem. I added IUSR_SRV-AMB-DB temporarily to the domain admin group and restarted IIS, but it didn't make a difference.
I'm at a loss. Can someone please help me.