Jump to content

Remote ODBC Socket Server


ptrex
 Share

Recommended Posts

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

Link to comment
Share on other sites

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

@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 by ptrex
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...