AutoIT – Connecting to Oracle.
Previously 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..!
3 Responses to “AutoIT – Connecting to Oracle.”
By kbguy on Mar 2, 2009 | Reply
hi.. tak faham lah. haha..
By arejae on Mar 2, 2009 | Reply
hi kbguy, lamo tok dengar khabar deh.hopefully dmo sihat-sihat sokmo.
hehe…pasal posting nie..takpo kalu tok pehe.ehehe..