Jump to content
Sign in to follow this  

AutoIt and SQL

Recommended Posts

I am attempting to pull some information out of a MSSQL table with AutoIt. However, the data I get back just shows extended ASCII characters rather than the data I want. If I do an objName on the $adRS("column_name") it tells me it is a "Field" so I know it is seeing it properly. Here is an example of the code I am using:

Local $adCN, $adRS
$adCN = ObjCreate("ADODB.Connection")
$adRS = ObjCreate("ADODB.Recordset")
$adCN.Open("DRIVER={SQL Server};SERVER=SERVER_NAME;DATABASE=DATABASE_NAME;uid=user_name;pwd=password") 
$adRS.ActiveConnection = $adCN
$adRS.Open("SELECT column_name FROM Table_Name")
    MsgBox(0, "SQL Test", $adRS("column_name"))
Until $adRS.EOF

Any thought on how I can get the info I need from the table?

Edited by SerialKiller

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  

  • Create New...