From: | "Daniel F Garcia" <dgarcia(at)ballsolutions(dot)com> |
---|---|
To: | <pgsql-odbc(at)postgresql(dot)org> |
Subject: | Connection to posgresql database works under windows scripting host but not IIS/ASP |
Date: | 2003-04-10 03:56:34 |
Message-ID: | 001b01c2ff15$3e97d850$f9020b0a@corp.systems.ballsolutions.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-odbc |
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.
Best Regards,
Daniel F Garcia.
Ball Systems Solutions
Phone: +61 7 5461 1223 Fax: +61 7 5461 1221 Mobile: 0438 670 947
Email: dgarcia(at)BallSolutions(dot)com
Mail: Level 2, 15 Gordon St, Ipswich Qld 4305
Web: <http://www.ballsolutions.com/> http://www.BallSolutions.com
"Not everything that can be counted counts, and not everything that counts
can be counted"
--Albert Enstein
From | Date | Subject | |
---|---|---|---|
Next Message | Wayne Armstrong | 2003-04-10 04:57:28 | Parse statement can fail for unquoted uppercase tablenames |
Previous Message | Wayne Armstrong | 2003-04-10 03:19:40 | SQLColumns, SQLTables where fails depending on row cache size |