Sign in to follow this  
Followers 0
AutoChris

AutoIt and SQL

3 posts in this topic

#1 ·  Posted (edited)

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")
Do
    MsgBox(0, "SQL Test", $adRS("column_name"))
Until $adRS.EOF
$adRS.Close
$adCN.Close

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



*BUMP*

Any ideas? Suggestions? Recommendations? Shots in the dark?

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

*BUMP*

Any ideas? Suggestions? Recommendations? Shots in the dark?

Use search engine :ph34r: and type: ADODB.Recordset

you will see how to work with Recordset ...

EDIT: my lucky post number :lmao:

Edited by Zedna

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  
Followers 0