SlowCoder74 6 Posted October 31, 2013 I'm trying to perform a simple connection to a database. Works fine on the ASP version of my code. I ported the code to AutoIT and it's not connecting. My AutoIT Code: $DBServerIP="<ip>" $DBServerName="<servername>" $DBDatabase="<db>" $DBUserID="<username>" $DBPass="<password>" $objCN = ObjCreate("ADODB.Connection") if Not IsObj($objCN) then msgbox(0,"","Not an object!") Exit endif $SQLString = "Dsn=Wallboard; Host=" & $DBServerIP & "; Server="& $DBServerName & "; Service=1504; Protocol=onsoctcp; Database=" & $DBdatabase & "; Uid=" & $DBuserID & "; Pwd=" & $DBpass $objCN.Open $SQLString if @error then msgbox(0,"","Connection NOT successful") Exit Else msgbox(0,"","Connection SUCCESSFUL!") EndIf $objCN.close None of my @errors seem to catch the problem. What I do get is this in the output pane of SCITE: ... ... (21) : ==> The requested action with this object has failed.: $objCN.Open $SQLString $objCN.Open ^ ERROR >Exit code: 1 Time: 19.452 Also, either I'm missing it, or is there no officially supported UDF for database connectivity in AutoIT? Share this post Link to post Share on other sites
Danp2 879 Posted October 31, 2013 Try: $objCN.Open($SQLString) 1 Fr33b0w reacted to this [UDF] WebDriver Latest version Wiki FAQs Share this post Link to post Share on other sites
SlowCoder74 6 Posted October 31, 2013 Try: $objCN.Open($SQLString) Son of a ...! It's always the little things. Thank you! Share this post Link to post Share on other sites