Jump to content

Error opening postgres database


cag8f
 Share

Recommended Posts

Hi all.  I'm having problems opening a postgres database.  My code:

Local $oConn = ObjCreate("ADODB.Connection")
Local $strConn = "DSN=PostgreSQL;DATABASE=<database name>;SERVER=localhost;Port=5432;Uid=<database username>;Pwd=<database password>"
$oConn.Open($strConn)

My error (at line 3):

D:\test.au3 (5) : ==> The requested action with this object has failed.:
$oConn.Open($strConn)
$oConn.Open($strConn)^ ERROR

Any ideas why this is failing?  

 
Some details that may be pertinent:
 
--system is running Windows 7 32 bit
--postgresql (version 8.3) is installed.  The database exists and is working.
--I can connect to the server and open the database using other third party applications (e.g. PG Admin), so I'm reasonably sure the database name, username, and password are correct.
--I have installed the latest postgresql ODBC driver.  I have also added that DSN to my Control Panel-->Administrative Tools-->Data Sources (ODBC) list.
 
Thanks.
 

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...