macost Posted December 5, 2006 Posted December 5, 2006 I can connect AutoIt with Oracle??? how I can make? has some example? Tks
JSThePatriot Posted December 5, 2006 Posted December 5, 2006 Does Oracle have COM functions? Command-line? These are things you have to check. I am sure there is a way that AutoIt can interact with Oracle, but I haven't seen any UDF's for that yet. JS AutoIt Links File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out. ComputerGetInfo UDF's Updated! 11-23-2006 External Links Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)
/dev/null Posted December 5, 2006 Posted December 5, 2006 (edited) I can connect AutoIt with Oracle???how I can make? has some example? TksYou can use the MySQL UDF. http://www.autoitscript.com/forum/index.php?showtopic=20814. It uses ODBC to connect to MySQL and thus should work with Oracle as well, provided that you have a proper ODBC driver for Oracle and don't need some special Oracle features. Some changes of the mySQL UDFs might be necessary. Also search the forum for "+objcreate +ADODB". You will find some other samples for ODBC.CheersKurt Edited December 5, 2006 by /dev/null __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *
ptrex Posted December 6, 2006 Posted December 6, 2006 @macost expandcollapse popup#include <GUIConstants.au3> Dim $oMyError ; Initializes COM handler $oMyError = ObjEvent("AutoIt.Error","MyErrFunc") $ado = ObjCreate( "ADODB.Connection" ) ; Create a COM ADODB Object with the Beta version With $ado ; 'Set data source - for OLEDB this is a tns alias, for ODBC it can be 'either a tns alias or a DSN. ; If "provider" is used this means that the ODBC connections is used via DSN. ; if Driver is used = "Driver={Microsoft ODBC for Oracle};Server=TNSnames_ora;Uid=demo;Pwd=demo;" then this is a DSN Less connector ; More Info for Oracle MS KB Q193332 .ConnectionString =("Provider='OraOLEDB.Oracle';Data Source='TNS NAME HERE';User Id='XXXX';Password='XXXXX';") .Open EndWith $adors = ObjCreate( "ADODB.RecordSet" ) ; Create a Record Set to handles SQL Records With $adors .ActiveConnection = $ado ;.CursorLocation = "adUseClient" ;.LockType = "adLockReadOnly" ; Set ODBC connection read only .Source = "select * from TABLE NAME HERE" .Open EndWith While not $adors.EOF For $i = 0 To $adors.Fields.Count - 1 ConsoleWrite( $adors.Fields( $i ).Value & @TAB ) ; Columns in the AutoIt console use Column Name or Index Next ConsoleWrite(@CR) $adors.MoveNext ; Go to the next record WEnd ; This COM error Handler Func MyErrFunc() $HexNumber=hex($oMyError.number,8) Msgbox(0,"AutoItCOM Test","We intercepted a COM Error !" & @CRLF & @CRLF & _ "err.description is: " & @TAB & $oMyError.description & @CRLF & _ "err.windescription:" & @TAB & $oMyError.windescription & @CRLF & _ "err.number is: " & @TAB & $HexNumber & @CRLF & _ "err.lastdllerror is: " & @TAB & $oMyError.lastdllerror & @CRLF & _ "err.scriptline is: " & @TAB & $oMyError.scriptline & @CRLF & _ "err.source is: " & @TAB & $oMyError.source & @CRLF & _ "err.helpfile is: " & @TAB & $oMyError.helpfile & @CRLF & _ "err.helpcontext is: " & @TAB & $oMyError.helpcontext _ ) SetError(1) ; to check for after this function returns Endfunc Change your TNS name, User and Password as well as your select statement. Enjoy ptrex Contributions :Firewall Log Analyzer for XP - Creating COM objects without a need of DLL's - UPnP support in AU3Crystal Reports Viewer - PDFCreator in AutoIT - Duplicate File FinderSQLite3 Database functionality - USB Monitoring - Reading Excel using SQLRun Au3 as a Windows Service - File Monitor - Embedded Flash PlayerDynamic Functions - Control Panel Applets - Digital Signing Code - Excel Grid In AutoIT - Constants for Special Folders in WindowsRead data from Any Windows Edit Control - SOAP and Web Services in AutoIT - Barcode Printing Using PS - AU3 on LightTD WebserverMS LogParser SQL Engine in AutoIT - ImageMagick Image Processing - Converter @ Dec - Hex - Bin -Email Address Encoder - MSI Editor - SNMP - MIB ProtocolFinancial Functions UDF - Set ACL Permissions - Syntax HighLighter for AU3ADOR.RecordSet approach - Real OCR - HTTP Disk - PDF Reader Personal Worldclock - MS Indexing Engine - Printing ControlsGuiListView - Navigation (break the 4000 Limit barrier) - Registration Free COM DLL Distribution - Update - WinRM SMART Analysis - COM Object Browser - Excel PivotTable Object - VLC Media Player - Windows LogOnOff Gui -Extract Data from Outlook to Word & Excel - Analyze Event ID 4226 - DotNet Compiler Wrapper - Powershell_COM - New
macost Posted December 6, 2006 Author Posted December 6, 2006 debtor for the aid... I go to try to make the connection. tks
macost Posted March 26, 2007 Author Posted March 26, 2007 I am with problems in conexao with oracle. "err.description is: Object closed "err.windescription: error not specifed "err.number is: 80020009 "err.lastdllerror is: 0 "err.scriptline is: 42 "err.source is: ADODB.Recordset "err.helpfile is: c:\WINDOWS\Help\ADO270.CHM "err.helpcontext is: 1240653 and "err.description is: error not specifed "err.windescription: error not specifed "err.number is: 80020009 "err.lastdllerror is: 0 "err.scriptline is: 38 "err.source is: Provider "err.helpfile is: "err.helpcontext is: 1240640 How to solve? I need help!!!!!! Tks
EdwardTFN Posted June 11, 2007 Posted June 11, 2007 I have sucessfully connected to Oracle! Thank you ptrex! Macost, você provavelmente esqueceu de substituir os campos informados ou o nome da tabela (que ele não informou para substituir). Já conseguiu esta conexão? Best regrds, Edward Firmo
ozumaki Posted December 31, 2010 Posted December 31, 2010 Hi How can i insert values into oracle db .... some examples would be good
rolok Posted June 21, 2012 Posted June 21, 2012 5 years later, and I found this post to be helpful. I got my connection working today, and am quite happy about getting data back! One thing to note, is that after much trial and error, I am using "Provider" but it is working with a TNS Name, not a DSN. Just thought it would be worth a response so that any others that are looking for help on this topic maybe will save a bit of time. Cheers!
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now