newbie210 Posted March 24, 2012 Share Posted March 24, 2012 I have two computers, one running win7 home, the other running win7 pro 64bit. I have sucessfully connected to a postgres database from auto it using the win 7 home machine, but can not do so from the win 7 pro 64 bit machine. The only difference is when installing the ODBC data source, I had to install a 64 bit version and I assume that now the connection string must be different, but I'm not sure. The code I'm using is as follows: $oConn = ObjCreate("ADODB.Connection") $strConn = "DSN=PostgreSQL;DATABASE=mydb;SERVER=localhost;Port=5432;Uid=postgres;Pwd=dbpass" $oConn.Open($strConn) On the third line I get an error messsage saying: Error: The requseted action with this object has failed. From the Control Panel --> Admin Tools --> Data Sources (ODBC) I have created a user DSN which when I test gives a successful message. As I said, this code works fine on the Win7 home computer, is there something simple I am missing? Thanks Link to comment Share on other sites More sharing options...
newbie210 Posted March 24, 2012 Author Share Posted March 24, 2012 Silly me, I needed to use the 64 bit version of autoit... problem solved Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now