Es wurde nur
Freeware bzw. OpenSource Software benutzt. Die benötige Module können aus
folgenden Quellen herunterladen werden:
dbExpress Driver
für ODBC |
OpenSource |
|
unixODBC |
Freeware |
|
FreeTDS |
Freeware |
gzip –d unixODBC-2.2.11.tgz
tar xvf unixODBC-2.2.11.tar
cd unixODBC-2.2.11/
./configure --enable-gui=no
make
make install
Default-Verzeichnis
für die Bibliotheken ist /usr/local/lib. Konfigurationsdateien liegen in
/usr/local/etc und sind odbc.ini und odbcinst.ini.
gzip –d freetds-stable.tgz
tar xvf freetds-stable.tar
cd freetds-0.63/
./configure --enable-msdblib
--sysconfdir=/usr/local/etc --prefix=/usr/local/freetds --with-tdsver=8.0
--with-unixodbc
make
make install
Installationsverzeichnis ist /usr/local/freetds. Konfigurationsdatei ist /usr/local/etc/freetds.conf.
Heruntergeladenes Archiv dbxoodbc.zip in beliebiges Verzeichnis auspacken. Mit Kylix Projekt-Datei dbxoodbc.dpr kompilieren. Datei libdbxoodbc.so ins Verzeichnis /usr/lib kopieren.
Wichtig: Treiber muss ab Version 3.024 sein.
Hier sind Beispiele der Konfigurationsdateien:
[MsServer2000]
host = 192.168.5.214
port = 1433
tds version = 8.0
try server login = yes
try domain login = no
client charset = CP1252
[TDS]
Description =
FreeTDS
Driver =
/usr/local/lib/libtdsodbc.so
Setup =
/usr/local/lib/libtds.so
FileUsage =
1
[MsServer2000]
Description=TDS
Driver=TDS
Servername=MsServer2000
Port=1433
Achtung : Der Wert Servername in odbc.ini muss Sektionsname aus freetds.conf sein.
[LOGBYTS]
DriverName=OpenODBC
Database=DSN=MsServer2000;SERVER=192.168.5.214;PORT=1433;UID=rgag;PWD=aBlobSize=-1
LocaleCode=0000
GetDriverFunc=getSQLDriverODBC
LibraryName=libdbxoodbc.so
VendorLib=libodbc.so
Achtung : Der Wert DNS in logbyts.conf muss Sektionsname aus odbc.ini sein.
procedure InitConnection(aConn:
TSQLConnection);
begin
if not
aConn.Connected then
with
aConn do
begin
// Connection wird initialisiert
Connected
:= false;
LoginPrompt
:= false;
LoadParamsOnConnect
:= false;
{$IFDEF LINUX}
DriverName
:= 'OpenODBC';
ConnectionName
:= 'LOGBYTS';
LoadParamsFromIniFile('/etc/dbxlogbyts.conf');
GetDriverFunc
:= trim(Params.Values['GetDriverFunc']);
LibraryName
:= trim(Params.Values['LibraryName']);
VendorLib :=
trim(Params.Values['VendorLib']);
{$ELSE}
raise
Exception.Create('Only Linux-Project');
{$ENDIF}
end;
end;
[Installed Drivers]
…
OpenODBC=1
….
[OpenODBC]
GetDriverFunc=getSQLDriverODBC
LibraryName=libdbxoodbc.so
VendorLib=libodbc.so
…
[MSOpenODBC]
DriverName=OpenODBC
Database=DSN=MsServer2000;SERVER=192.168.5.214;PORT=1433;UID=rgag;PWD=aBlobSize=-1
LocaleCode=0000
Nach Software-Installation müssen folgende Umgebungsvariable initialisiert werden:
ODBCINI=/usr/local/etc/odbc.ini |
|
FREETDS=/usr/local/etc/freetds.conf |
|
SYBASE=/usr/local/freetds |
|
TDSDUMP=/tmp/freetds.log |
|
SetEnv LD_LIBRARY_PATH /usr/local/kylix3/bin
SetEnv ODBCINI=/usr/local/etc/odbc.ini
SetEnv FREETDS=/usr/local/etc/freetds.conf
SetEnv SYBASE=/usr/local/freetds
SetEnv TDSDUMP=/tmp/freetds.log
SetEnv LANG=de_DE@euro
SetEnv LC_ALL=de_DE@euro
SetEnv LC_COLLATE=POSIX
7.1. Freetds on SuSE 9.2 http://www.theevilpixel.com/node/60
7.2. Gentoo
- mssql, freetds, unixodbc, php setup http://thinkflat.com/howto/gentoo-mssql-freetds.html
7.3. Easysoft
dbExpress-ODBC Gateway http://www.easysoft.com/support/kb/kb00693.html