Page 1 of 1
Error conecting to mssql with zeosdb on debian
Posted: 17.12.2010, 18:31
by tao
Hello,
I have an error trying connect to server mssql with zeosdb on debian.
Error say:
"None of the dynamic libraries can be found: ntwdblib.dll"
On windows resolve it copying file "ntwdblib.dll" to c:\window\system32,
but on Linux how?
THANKS!
Posted: 17.12.2010, 21:03
by mdaems
Sorry,
But as far as I know there is no library on Linux which implements the same interfaces as the ntwdblib.dll file on windows does. I think you better double check for this on a mssql related site.
Mark
Posted: 17.12.2010, 22:03
by trupka
I think that native MSSQL client lib doesn't exist under linux but, sybase dblib have very similar protocol as MSSQL server - both products have same roots. So you might try Sybase dblib driver ( for linux client lib take a look at freetds.org).
Posted: 08.10.2012, 17:18
by mario13
- The error "None of the dynamic libraries can be found: ntwdblib.dll" appears because you choose protocol mssql, which is intended only for native Microsoft library on a Windows client.
- For Debian, you can use FreeTDS libraries with Lazarus. For example, you put TZConnection with protocol FreeTDS_MsSQL-2000, in this case you must have installed the FreeTDS libraries (in Debian the packages freetds-bin and libsybd5). For this to work you have to modify ZPlainDbLibDriver.pas in th line 68: FREETDS_LINUX_DLL_LOCATION = 'libsybdb.so';
Also, there are other three protocol variants for different server versions.
Posted: 09.10.2012, 12:18
by EgonHugeist
mario13,
you're right. Actually i'm very busy with my own projects. I'll add the download link
ftp://ftp.freepascal.org/fpc/contrib/windows/ with libiconv to our readme. Have you tested if the chars are written right into the DB?
Btw. You can also use TZConnection.LibraryLocation to load a library with different name.
Posted: 16.10.2012, 01:58
by mario13
Hi EgonHugeist :
I was able to insert chars into MsSQL 2000, with the correct encoding, words like "Ñandú".
For this to work, for example in Lazarus over Linux (native UTF8), in the sources I use:
use LConvEncoding;
QQ.sql.add(' set nombre = '''+UTF8ToCP1252('Ñandú')+''' ');
Mario
Posted: 16.10.2012, 06:06
by EgonHugeist
mario13,
this suggestion seems to be supported since FPC2.7.1 right? Another idea would be to use the FreeTDS driver instead. But actually we have nobody who is able to compile us the project for *nix systems, are you? With FreeTDS supports the libiconv charset conversations and you can choose the charset you want to have.
Posted: 01.11.2012, 01:41
by mario13
EgonHugeist,
I'm working with Lazarus 1.0.2 over FPC 2.6.0, with FreeTDS 0.91, all over Debian Linux 64 bits (and also in 32 bits). The example with "Ñandú" was compiled with 2.6.0 and is working ok.
I can compile in Linux whatever, or make tests if you want.
Posted: 02.11.2012, 12:34
by EgonHugeist
mario13,
well i think my issues are solved by my selves. Start reading here:
http://zeos.firmos.at/viewtopic.php?t=3 ... &start=546
i've manged the MsSQL encoding issues if TZConnection.AutoEncodeStrings = True, TZConnection.ControlsCodePage = cCP_UTF8, TZConnection.ClientCodepage <> '' and the WITH_LCONVENCODING is uncommented in ZeosLazarus.inc. If all these conditions are set, than you can use Zeos+Debian-FreeTDS+MsSQL like a normal UTF8Encoded RDBMS. All characters are displayed right and you do not need some more extra lines than your known custom with Lazarus brings with...
But i'm fighting with the Libiconv implementation to get all my encoding stuff fullfilled before going to stable..