Page 1 of 1

ZeosLib Network Protocoll

Posted: 07.06.2008, 02:06
by laqup
Hi,

i wrote a small tool with Delphi that uses the ZeosLib 6.6.1-beta components to connect to a MS-SQL database.

Everything worked fine until last week. Unfortunately we had to deactive the named pipes protocoll at our database-server due to problems with another program (with a much higher priority).

Now my tool can't establish a connection to the database any longer. The ZeosLib-components access "C:\WINDOWS\system32\dbnmpntw.dll" and seem to use the named pipes protocoll.

Is it possibile to use TCP/IP instead?
And if this is possible: How do I have to change the protocoll, which *.dlls do I have to use?

Maybe someone knows a TCP/IP alternative if it is not possible.

Thanks in advance and keep up your good work.

Best regards,
Daniel

Posted: 09.06.2008, 13:49
by gto
Hello laqup!

Welcome to our forum :)

1st of all, note that Zeos grew a lot from 6.6.1-beta.. every we update the sources with something good.. may be good that you pick a copy from the latest version at the SVN ;)

Talking about protocols, Zeos doesn't use any of them, is the library from each DB that handles connections at this level. You can see Zeos only as a interface from your Dev Tool and your database, this means, your database library, locally speaking.

As I'm no expert in MS-SQL, could be switches while loading the library that changes the way it works, from named pipes to TCP, but I'm afraid you'll need to look at this in MS-SQL library documentation, and then we can write the proper code.

If you got some spare time, you may want to look at the plain and dbc folder of Zeos after the DbLib files (responsible to handle MS-SQL). All files except that folders are common to others DBs ;)

Posted: 09.06.2008, 15:03
by laqup
Hi gto,

thanks for your answer. I (respectively a clever dude from delphi-treff.de) found a good solution:

Instead of choosing "ms-sql" as the protocol in the tzconnection-component you have to use "ADO". In the ADO-properties you can select the OLE provider for ms-sql-servers to connect to the database. Additional the ADO-protocoll has the possibility to specify the desired network-protocoll, e.g. "Network Library=Dbmssocn". Dbmssocn.dll contains the TCP/IP Sockets library.

That's it.

Best Regards,
Daniel