Jump to content

Recommended Posts

Posted (edited)

I had a successful and working PostgreSQL connection when using version 8.1. When I updated to 8.4, it stopped working. I have tried several combinations (such as UNICODE, UTF8 and others) to no avail and am wondering if maybe the AutoIt driver needs to be updated?

It creates the connection object just fine and generates the error on the Open...

pgdb.au3 : ==> The requested action with this object has failed.:

$ohand = $oConn.Open($oConnstr)

$ohand = $oConn.Open($oConnstr)^ ERROR

Does anyone have a successful PostgreSQL version 8.4 connection working and if so what is different?

$oConn = ObjCreate("ADODB.Connection")
if @error Then
    MsgBox(0, "Error", "Could not create connection object!")
EndIf

$oConnstr = "DRIVER={PostgreSQL ANSI};DATABASE=myDb;SERVER=myServer;Port=5432;Uid=myUid;Pwd=myPwd"
$ohand = $oConn.Open($oConnstr)
Edited by Gamey
Posted

Ah, via another thread and Richard Robertson via help, I added an error handler and it generated this. The data source does exist but "no default driver is specified".

post-56136-12664395947209_thumb.jpg

Posted

Thanks for all the help! Seriously, the lack of it made me figure it out myself which is always a gratifying thing. For anyone else who may run into this, you have to setup a Data Source Name or DSN in ODBC administration. I happened to be using XP.

And instead of connecting to a driver...

$oConnstr = "DRIVER={PostgreSQL ANSI};DATABASE=myDb;SERVER=myServer;Port=5432;Uid=myUid;Pwd=myPwd"

...you connect to the DSN....

$oConnstr = "DSN=PostgreSQLxxx;DATABASE=myDb;SERVER=myServer;Port=5432;Uid=myUid;Pwd=myPwd"

Posted

One more thing. Beginning with PostgreSQL 8.3, EnterpriseDB began providing one-click installer packages but the pginstaller packages are still available. But beginning with 8.4, only EnterpriseDB provides the installer packages; no more pginstallers for 8.4. These are for Windows. And beginning with 8.3, you must run StackBuilder and install the psqlOBDC drivers, also provided by EnterpriseDB.

  • 2 months later...

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
  • Recently Browsing   0 members

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