Connection to posgresql database works under windows scripting host but not IIS/ASP

Поиск
Список
Период
Сортировка
От Daniel F Garcia
Тема Connection to posgresql database works under windows scripting host but not IIS/ASP
Дата
Msg-id 001b01c2ff15$3e97d850$f9020b0a@corp.systems.ballsolutions.com
обсуждение исходный текст
Ответы Re: Connection to posgresql database works under windows scripting host but not IIS/ASP  (Chris Gamache <cgg007@yahoo.com>)
Список 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@BallSolutions.com
Mail: Level 2, 15 Gordon St, Ipswich Qld 4305
Web: http://www.BallSolutions.com

"Not everything that can be counted counts, and not everything that counts can be counted"
--Albert Enstein

 
Вложения

В списке pgsql-odbc по дате отправления:

Предыдущее
От: "Wayne Armstrong"
Дата:
Сообщение: SQLColumns, SQLTables where fails depending on row cache size
Следующее
От: "Wayne Armstrong"
Дата:
Сообщение: Parse statement can fail for unquoted uppercase tablenames