Error conecting to mssql with zeosdb on debian

Forum related to MS SQL Server

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
tao
Fresh Boarder
Fresh Boarder
Posts: 1
Joined: 17.12.2010, 18:28

Error conecting to mssql with zeosdb on debian

Post 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!
Last edited by tao on 17.12.2010, 22:16, edited 1 time in total.
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post 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
Image
trupka
Expert Boarder
Expert Boarder
Posts: 140
Joined: 26.08.2007, 22:10

Post 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).
mario13
Fresh Boarder
Fresh Boarder
Posts: 6
Joined: 06.08.2011, 22:27

Post 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.
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

Post 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.
Best regards, Michael

You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/

Image
mario13
Fresh Boarder
Fresh Boarder
Posts: 6
Joined: 06.08.2011, 22:27

Post 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
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

Post 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.
Best regards, Michael

You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/

Image
mario13
Fresh Boarder
Fresh Boarder
Posts: 6
Joined: 06.08.2011, 22:27

Post 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.
User avatar
EgonHugeist
Zeos Project Manager
Zeos Project Manager
Posts: 1936
Joined: 31.03.2011, 22:38

Post 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..
Best regards, Michael

You want to help? http://zeoslib.sourceforge.net/viewtopic.php?f=4&t=3671
You found a (possible) bug? Use the new bugtracker dude! http://sourceforge.net/p/zeoslib/tickets/

Image
Post Reply