--------------------------------------------------------------------------------

DBTCP 0.1.14

DBTCP is a simple proxy server for ODBC connections.
It can make simple query to a database throught a Windows machine; a server run on Windows and accept connections from DBTCP clients.

LICENSE

DBTCP is released under GPL see LICENSE.txt.

SERVER
Copy 'DBTCP.exe' from the 'windows' directory to yours Windows machine.
Execute DBTCP.exe and all DSN on your Windows machine will be available to DBTCP clients.

You can specify the cursor type and library to use using the 'Options' button on the toolbar.
You can specify a list of IPs allowed to connect to the server, for doing that you can:
	- manually edit '@dbtcp.exe_directory@\Access.cfg' file, inserting one IP in each line.
	- using 'User' toolbar button on server window; a allowed IPs windows appear and you can insert ip in the grid.
          WildCard '*' is supported for allowing multiple IP in one line (e.g. 192.168.26.* ).
ATTENTION: If you don't specify any IP address anyone is allowed to connect to your DBTCP.

CLIENT

- Compile
  LINUX:
  I have tested it only on Linux/Red Hat ( Intel and Alpha ); just type 'make'.

  SOLARIS ( Compile only )
  Use the GNU make, usually invoke with gmake.
  Modify the Makefile for the Solaris architecture, under i"supported architecture" change:
  ARCH=Linux
  #ARCH=FreeBSD
  #ARCH=Solaris
  to:
  #ARCH=Linux
  #ARCH=FreeBSD
  ARCH=Solaris

  FREEBSD ( Compile only )
  Use the GNU make, usually invoke with gmake.
  Modify the Makefile for the Solaris architecture, under i"supported architecture" change:
  ARCH=Linux
  #ARCH=FreeBSD
  #ARCH=Solaris
  to:
  #ARCH=Linux
  ARCH=FreeBSD
  #ARCH=Solaris

- Usage:
  dbtcp [OPTION] remote_dsn host [port]
  Options:
  -e      --escape-chars  Escape control chars when writing strings.
                          Convert the following characters:
                          CHR(0x09) -> '\t'
                          CHR(0x0a) -> '\n'
                          CHR(0x0d) -> '\r'

  -p      --port=...      Port number to use for connection.
  -h      --help  Usage

remote_dsn - The connect string used to access a datasource
      ex. "DSN=mydb"
      You can specify any parameter needed in DSN, such as user,password etc.
      ex. "DSN=mydb;UID=my_user;PWD=my_pwd"

host - DBTCP server hostname

ex: 
Connect to 'dbhost' and use 'mydb' datasource in interactive mode:

linux:~ $ ./dbtcp DSN=mydb dbhost
dbtcp> SELECT * FROM art

Connect to 'dbhost' and use 'mydb' datasource in batch mode ( useful for dumping tables )

linux:~ $ echo "SELECT * FROM art" | ./dbtcp DSN=mydb dbhost > art.dat
Now you can load data to a mysql database with:

linux:~ $ echo "LOAD DATA INFILE './art.dat' INTO TABLE art" | mysql test

PERL DBD Driver
There is an experimental Perl DBD driver for dbtcp, it's heavly based on DBD:Oracle and DBD:ODBC.
To compile and try it type ( from the base directory ):

linux:~ $ make
linux:~ $ cd DBD-dbftp
linux:~ $ perl Makefile.PL
linux:~ $ make
linux:~ $ make install

See 'DBD-dbftp/t/select.t' for an example on how to use it.

PHP4 DRIVER:
See php/INSTALL for installation instructions;
    php/php-functions.txt for the functions available in php;
    test-dbtcp.php for a working example of use.

CONTACTS:
If you have any problems or questions mail to giussani@fastflow.com for the client part or fossati@fastflow.it for the server part.
