Nachiket Posted November 22, 2007 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.....
Baloven Posted November 22, 2007 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
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