Nachiket Posted November 22, 2007 Share Posted November 22, 2007 Hi I am using the following code to connect to the database $sqlCon = ObjCreate("ADODB.Connection") $sqlCon.Open("DRIVER={SQL Server};SERVER=10.224.72.184;DATABASE=ORADCTM;UID=scott;PWD=tiger") if @error Then MsgBox(0, "ERROR", "Failed to connect to the database") Exit Else MsgBox(0, "Success!", "Connection to database successful!") EndIf I am getting the following error : The requested action with this object has failed My database name is ORADCTM server to which i am connecting is 10.224.72.184 Pls help me out in the issue..... Link to comment Share on other sites More sharing options...
Baloven Posted November 22, 2007 Share Posted November 22, 2007 (edited) CODE$sqlCon = ObjCreate("ADODB.Connection")$sqlCon.Open("DRIVER={SQL Server};SERVER=10.224.72.184;DATABASE=ORADCTM;UID=scott;PWD=tiger;")if @error ThenMsgBox(0, "ERROR", "Failed to connect to the database")ExitElseMsgBox(0, "Success!", "Connection to database successful!")EndIfhhhmmm...Probably does not suffice '; ' (has allocated red)I use #include <_sql.au3> Edited November 22, 2007 by Baloven 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