The future of dblib API (mssql protocol)

Forum related to MS SQL Server

Moderators: gto, cipto_kh, EgonHugeist

Tavo
Fresh Boarder
Fresh Boarder
Posts: 3
Joined: 03.02.2010, 19:11
Contact:

The future of dblib API (mssql protocol)

Postby Tavo » 05.08.2011, 19:23

Hi All!!! It is my first post here.
I am working with

Delphi 6
Zeos 6.6.6
MS-SQL Server

I understand that the "mssql" protocol use DBLIB API. Is it obsolete?
I would appreciate more information on the subject

rautgigi
Fresh Boarder
Fresh Boarder
Posts: 16
Joined: 08.10.2006, 19:54

Postby rautgigi » 22.05.2012, 10:30

Hi,

dblib is not supported for some time by microsoft. They use oledb (with ct-lib), and right now i understand that they change to odbc (starting with SQL Server 2012). This layer is for API access to SQL Server. The inner protocol is TDS with different versions. The dblib library (ntwdblib.dll) is not updated and right now i think there is not provided anymore. You can go with ADO - OLEDB (ct-lib), which has more support for data types and futures. But soon it will become unsupported. The other option is FreeTDS which is a free implementation of TDS protocol, exporting the same api as db-lib does. The good part is that the freeTDS is still maintained and updated according to new protocol specifications, and it should be fine for working with SQL Server from 6.5 to 2008 and 2012 (i think - no tested). The downside is that the freeTDS it's based on specs and protocol reverse (some functions can be missing), and there is no support for async call (ex: with dblib in spite using dbSqlExec you can use dbsqlsend and test dbdataready in order to have an assync call).

On the dblib provided by microsoft there are some limitations:
- maximum 256 chars per varchar (until SQL 2005 there was a limitation also on the server side : only 8000 chars inside varchar, starting with 2005 there is a new datatype varchar(max)). Workaround: cast the column to text inside de sql order.
- the bit columns dosen't allow nulls. I think only in some driver versions ( i didn't check for some time ....). Workaround: use tinyint or int cast ....
- doesn’t support unicode,
this is what i remember, there can be more ....

Hope that help,
Bogdan


Return to “MS SQL Server”

Who is online

Users browsing this forum: No registered users and 1 guest