********************************************************
# FILE NAME:     HOWTO_WEBPODBC
#                : How To Install database for Web+ application
#                  on Unix/Linux/Solaris ...
#
# Copyright (c) 2000 by talentsoft, inc.
# ALL RIGHTS RESERVED
#
# DESCRIPTION:
# Documentation:  How To Use ODBC connectivity
# on Linux/Unix/FreeBSD
#
#
# NOTE:
#
# COMMENT:
#
#******************************************************

Introduction: After having messed around with third party ODBC drivers, we decided to write our own version which minimizes the installation time and space requirements. The following will guide you through the relatively simple installation.

Important Note: This driver only works from linux/unix to WindowsNT, it does not provide ODBC connections from unix to unix or WindowsNT/2000 to unix/linux.

Windows Side:

1. Copy the following files to the Windows machine running the database you wish to connect to: 1.webpdbgate.exe, 2.webpdbgate.ini, 3. instwsvc.exe. You will need to move webpdbgate.ini to the WindowsNT directory. You can find these files under the directory in which you unpacked webplus under the subdirectory webpdbgate. 

2. Install webpdbgate.exe as a service. This requires the use of the following executable file: instwsvc.exe. The syntax is instwsvc /g driver:[path to webpdbgate.exe]. For example: instwsvc /g driver:\webplus\bin\webpdbgate.exe.

3. Set the Port which Web+ will listen on, make sure that you do not set it to a port already in use. DO NOT set it to the same port your database uses. 

4. Start the service if it is not already started (Start|Settings|Control Panel|Services).

5. Set the database using the Windows ODBC configuration assistant (STart|Settings|Control Panel|ODBC Settings).

Unix/Linux Side:
1. Make sure that the file webp_generic.so is in /webplus/bin

2. If it is not already there add the following to webpsvr.conf (under /webplus/bin). You will need to stop Web+ in order to do this by issuing as root the following from the command line: /webplus/webpadmin stop. Add the following Section and values:
[WebpODBCGate]
Host=IP Address of WinNT machine with the database you wish to connect to
Port=Port number you set in webpdbgate.ini on WinNT machine
Here is a real example:
[WebpODBCGate]
Host=213.22.214.2
Port=9999

3. Define a datasource. Here is an example to follow:
SQLDatasourceXX=SQLDB
DataSourceTypeXX=WebpODBC
SQL_SelectXX=1
SQL_InsertXX=1
SQL_UpdateXX=1
SQL_DeleteXX=1
SQLUserIDXX=foo
SQLPasswordXX=bar

4. Resstart Web+ and you should be able to connect to the database on the NT machine.
