Jump to content

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


Desker
 Share

Recommended Posts

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

Link to comment
Share on other sites

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)
Link to comment
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
 Share

  • Recently Browsing   0 members

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