pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Daniel F Garcia <dgarcia@ballsolutions.com>
To: pgsql-odbc@postgresql.org
Subject: Connection to posgresql database works under windows scripting host but not IIS/ASP
Date: Thu, 10 Apr 2003 13:56:34 +1000
Message-ID: <001b01c2ff15$3e97d850$f9020b0a@corp.systems.ballsolutions.com> (raw)

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/; http://www.BallSolutions.com

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


 

Attachments:

logo.gif (image/gif, 4.3K) download view image

view thread (4+ messages)  latest in thread

Message-ID: <001b01c2ff15$3e97d850$f9020b0a@corp.systems.ballsolutions.com>
Permalink:  ../001b01c2ff15$3e97d850$f9020b0a@corp.systems.ballsolutions.com/
Also on:    postgresql.org/message-id/001b01c2ff15$3e97d850$f9020b0a@corp.systems.ballsolutions.com

 · 

reply

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-odbc@postgresql.org
  Cc: dgarcia@ballsolutions.com
  Subject: Re: Connection to posgresql database works under windows scripting host but not IIS/ASP
  In-Reply-To: <001b01c2ff15$3e97d850$f9020b0a@corp.systems.ballsolutions.com>
  References: <001b01c2ff15$3e97d850$f9020b0a@corp.systems.ballsolutions.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