Jump to content
Sign in to follow this  

Dern those databases!

Recommended Posts

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:


$objCN = ObjCreate("ADODB.Connection")
   if Not IsObj($objCN) then
      msgbox(0,"","Not an object!")

$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")
      msgbox(0,"","Connection SUCCESSFUL!")


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

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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...