ptrex Posted September 28, 2007 Share Posted September 28, 2007 Remote ODBC Socket Server Sometimes it happens that in order to do an ODBC connection, you need to install some client software. Like for instance to do a ODBC connection for Oracle you need to install their software on each client. http://odbcsock.sourceforge.net/ ODBC Socket Server is an open source database access toolkit that exposes Windows ODBC data sources with an XML-based TCP/IP interface. Well using this ODBCSocketServer COM interface will solve this issue. The Server wll return the data in XML format. This COM server support a COM interface as well as it has clients that suppoort C++, Python, Perl, PHP Install the ODBC Server Service in the server or PC that has the Database cllient software running. And then use this client to query the database from any client that has the ODBC Client COM registered. "Or if you don't want to register, use my REGFREE DLL approach in my signature." ; http://odbcsock.sourceforge.net/ ; Download the ODBC Client / Server here : ; http://odbcsock.sourceforge.net/release/ODBCSocketServer.zip $HostName = "127.0.0.1" $PortNr = 9628 $Seconds = 100 $ODBCClient = ObjCreate("ODBCClient.ODBCClient") If Not IsObj ($ODBCClient) Then MsgBox(0,"Error", "No ODBC Client Object registered on your machine ") Else MsgBox(0,"Error", " OK ") EndIf $Host = $ODBCClient.Hostname($HostName) $Port = $ODBCClient.Port($PortNr) $TimeOut = $ODBCClient.SocketTimeOut($Seconds) $Qry = $ODBCClient.ExecSQL(("SELECT * FROM table") ConsoleWrite($Qry) Enjoy !! regards ptrtex 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 Link to comment Share on other sites More sharing options...
JRSmile Posted September 28, 2007 Share Posted September 28, 2007 Remote ODBC Socket Server Sometimes it happens that in order to do an ODBC connection, you need to install some client software. Like for instance to do a ODBC connection for Oracle you need to install their software on each client. Well using this ODBCSocketServer COM interface will solve this issue. The Server wll return the data in XML format. This COM server support a COM interface as well as it has clients that suppoort C++, Python, Perl, PHP Install the ODBC Server Service in the server or PC that has the Database cllient software running. And then use this client to query the database from any client that has the ODBC Client COM registered. "Or if you don't want to register, use my REGFREE DLL approach in my signature." ; http://odbcsock.sourceforge.net/ ; Download the ODBC Client / Server here : ; http://odbcsock.sourceforge.net/release/ODBCSocketServer.zip $HostName = "127.0.0.1" $PortNr = 9628 $Seconds = 100 $ODBCClient = ObjCreate("ODBCClient.ODBCClient") If Not IsObj ($ODBCClient) Then MsgBox(0,"Error", "No ODBC Client Object registered on your machine ") Else MsgBox(0,"Error", " OK ") EndIf $Host = $ODBCClient.Hostname($HostName) $Port = $ODBCClient.Port($PortNr) $TimeOut = $ODBCClient.SocketTimeOut($Seconds) $Qry = $ODBCClient.ExecSQL(("SELECT * FROM table") ConsoleWrite($Qry) Enjoy !! regards ptrtex you make me afraid of beeing spyed, every project i start you deliver a function for... BIG THANKS!!! keep up the good work. is it possible to get the sourcecode of this and replace the server component with an autoit script so that maybe events or queries can be done to autoit scripts by other autoit scripts via com interface? $a=StringSplit("547275737420796F757220546563686E6F6C75737421","") For $b=1 To UBound($a)+(-1*-1*-1)step(2^4/8);&$b+=1*2/40*µ&Asc(4) Assign("c",Eval("c")&Chr(Dec($a[$b]&$a[$b+1])));''Chr("a")&"HI" Next ;time_U&r34d,ths,U-may=get$the&c.l.u.e;b3st-regards,JRSmile; MsgBox(0x000000,"",Eval("c"));PiEs:d0nt+*b3.s4d.4ft3r.1st-try:-) Link to comment Share on other sites More sharing options...
ptrex Posted September 28, 2007 Author Share Posted September 28, 2007 (edited) @JRSmile Thanks !! The lesson is, if you need something go and look for it on the net. Almost everything has already been invented by someone else. This saves my at least a lot of time. Ps : Regaarding the source code it is included in the download zip file, you can have a look. regards, ptrex Edited September 28, 2007 by 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 Link to comment Share on other sites More sharing options...
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