AutoIT – Connecting to Oracle.
Wednesday, February 18th, 2009Previously I wrote about how to connect to SQL Server using AutoIt. Since that I’m using Oracle as my main database in my new workplace, I will show how to do the same thing for Oracle.
$conn = ObjCreate( "ADODB.Connection" )
$DSN = "Driver={Microsoft ODBC for Oracle};Server=ORCL;Uid=myID;Pwd=myPwd;"
$conn.Open($DSN)
$rs = ObjCreate( "ADODB.RecordSet" )
$rs.Open( "select BANNER from v$version where banner like 'Oracle%'", $conn )
MsgBox(0, "AutoIT-SQL Result", "Value = " & $rs.Fields( "BANNER" ).Value )
$conn.close
The codes will produce something like below.

Till then..
Happy coding..!
