Jump to content

Recommended Posts

Posted

lookin for help on getting autoit v3 to get info from a database list

any help would be helpful

thx

lookin for getting info from mysql or sql server then replying back with the nfo or a txt file would work if I can search in the file then report back the nfo of the line in the txt file

Posted

I do use AutoIt with Mysql. Do you need help to connect ?

Or to create a text file from a SQL Table ?

thx for the help Was just lookin for the commands to use. I've been lookin all over to find them

Posted (edited)

Hello,

A simple which uses :

- An odbc Connection.

- Mysql (but this kind of very simple SQL Statement will work with others databases).

- The Beta Version of AutoIt which handles COM.

$ado = ObjCreate( "ADODB.Connection" )   ; Create a COM ADODB Object  with the Beta version
$ado.Open( "DSN=My_ODBC_DSN" )           ; Must exists in your odbc links.
$adors = ObjCreate( "ADODB.RecordSet" ) ; Create a Record Set to handles SQL Records
$adors.Open( " Select * from MyTable", $ado ); Execute a SQL Select

While not $adors.EOF                                              ;  
    ConsoleWrite( $adors.Fields( 1 ).Value&@CRlf )   ; First Column in th AutoIt console
    $adors.MoveNext                                             ; Go to the next
WEnd

HTH,

Francis

Edited by Francis Lennert (France)
Posted

thx to both of you Francis Lennert & ivan for your help. The nfo both have gaven me has put me on the

right path.

thx

Desker

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...