Page 1 of 1

MS-SQL: problems with ntwdblib.dll

Posted: 13.08.2012, 15:42
by hstijnen
Hi,
I'm using ZEOS 7.1 to connect to MS-SQL server and get several problems pointing to ntwdblib.dll (e.g. "error in ntwdblib.dll: read from location F00000"). On my own pc with Windows 7 all runs OK, but on another pc with Windows XP i get the error. Very strange is that it happens any time on another place in my program.

Googling on ntwdblib.dll it appears that it is rather old and it is advised to replace it by another technique to connect with MSSQL (e.g. ODBC).

Is there anybody with experience on ZEOS7 / MS-SQL? Is ntwdblib absolutely needed or can i avoid it?

Thanks for suggestions

Henk

Posted: 14.08.2012, 10:47
by miab3
@hstijnen

Use The FreeTDS Luke :)
In my work with Zeos7 on Win 32/64 and Linux.

Michal

Posted: 14.08.2012, 14:10
by hstijnen
Thanks for your suggestion.
The problem pc is external and i've asked to restart it. First I shall wait for the results and when that not helps, i shall try your suggestion.

Posted: 15.08.2012, 09:56
by EgonHugeist
hstijnen,

from the MS documentations i know the ntwlib.dll is only supported untion SQL Server 2005. But i have a valid 2005 Server and have no luck here. The FreeTDS implementation allows direct C++API Acces without ADO and is much faster. So i propose the same like Michal did.

Michael

Posted: 15.08.2012, 16:49
by hstijnen
Is it needed in that case to recompile the ZEOS code with compiler directives?
anywhere in the sources i saw some code:

unit ZPlainDbLibMsSql7;
...
WINDOWS_DLL_LOCATION ={$IFDEF FREETDS} 'dblib.dll'{$ELSE}'ntwdblib.dll'{$ENDIF};
{$IFDEF FREETDS}
LINUX_DLL_LOCATION = 'dblib.so';
{$ENDIF}

Posted: 16.08.2012, 21:04
by EgonHugeist
hstijnen,

i don't know which rev do you use here. It seems for me like a very old version. The lines and file you post here are removed since several weeks. For me the default locations looks like this:

NTWDBLIB_DLL_LOCATION ='ntwdblib.dll';
LIBSYBDB_WINDOWS_DLL_LOCATION = 'libsybdb.dll';
LIBSYBDB_LINUX_DLL_LOCATION = 'libsybdb.so';
FREETDS_WINDOWS_DLL_LOCATION = 'msdblibr.dll';
FREETDS_LINUX_DLL_LOCATION = 'dblib.so';
FREETDS_OSX_DLL_LOCATION = 'dblib.dylib';

and we have a compiled FreeTDS msdblibr.dll (release) in our lib folder too. So please update your Zeos. Actual Rev: 1649 on http://svn.code.sf.net/p/zeoslib/code-0 ... es/testing

Michael