Page 1 of 1

New API to MSSQL using FreeTDS DB-Lib

Posted: 05.12.2011, 18:31
by mdbs99
Hi,
Some developers are working in a wrapper to use FreeTDS in FreePascal/SQLdb and this already working good.

IMHO, Zeos should be use this new API because it is better than old ntwdblib.dll.

Click here to see the discussion about TMSSQLConnection class.

The ADO is the better way to works with MSSQL, but ADO do not work with FreePascal, so I think this is a good option.

Posted: 12.12.2011, 13:45
by mdbs99
Nobody interested?

Posted: 16.12.2011, 01:39
by EgonHugeist
Sound's very interesting, i will take a look..

Posted: 17.12.2011, 22:58
by mdaems
It would be very interesting. If you think you could write a FreeTDS driver and want to add it to the zeoslib project, please contact me, so I can add you to the commiters list on sourceforge.

Mark

BTW : I do NOT have time nor test servers available for active mssql development. So I can only provide some theoretical or logistical support on this.

Posted: 21.05.2012, 20:58
by rautgigi
Hi,

This is my implementation for FreeTDS driver. It's base on dbLib driver with some modifications. I make some test with same basic sql and it should be fine. It will be more ease for me also if you can include it into svn.

You should change WINDOWS_DLL_LOCATION inside ZPlainFreeTDS with dblib_dll.dll or what is the name of the freeTDS library.

All the best,
Bogdan Dragulin

Posted: 21.05.2012, 21:36
by EgonHugeist
rautgigi,

YEEESS somebody who works with us! Terrifik! I' ll look @this very exactly, trust me on that! :D
But first on the next days. I was also working on the TDS-Driver. But i'm not ready because i've simplified the whohle DBLib untit. My proposal is attached. Can you take a look to this too?

I've tryed to manage some strong simplifications. Also i've thinned the code extreamly out. The existing ASE and and MsSQL7 files are out of use now. But i've problems with the exception-handlers... And acually no luck with connecting to my 2005 Server...

Did you've success with connecting? May i ask you some things concering the FreeTDS?

Which server did you use here? With which TDSVER did you compile the library

Michael

Posted: 21.05.2012, 21:50
by rautgigi
Hi,

I will have a look on the dblib. Yes you can always ask :).
I just add #define MSDBLIB 1 to the Src\win32\config.h file and comment out
//#define TDS42 1 and add #define TDS72 1. So the TDS Version was 72, but it should be leaved as TDS42. It took me a day to figure out that the 72 version is not supported right now, and also that the version can be simply change as a running value using SetEnvironmentVariable( PWideChar('TDSVER'), PWideChar('7.2') );

Posted: 21.05.2012, 22:01
by EgonHugeist
Hmm i'm not so shure if that runtime Protocol changes do work. But i'll try this.

Like i wrote before i'm not ready. But each help is always welcome. In my proposal i try to use the inheritence as best as possible. My first straight intention was it to simplify the whole Sybase and MsSQL units.

So this might be interesting for you too. I thought some override do mange everything as well where we've differences. Example are the constants which are a little bit different and some record changes.

btw. pm is comming again.

Michael