[fpc-pascal] SqlDB and MS SQL Server support

Graeme Geldenhuys mailinglists at geldenhuys.co.uk
Wed Aug 13 21:40:05 CEST 2014

On 2014-08-13 09:54, Michael Van Canneyt wrote:
> To my knowledge, there are pre-compiled freetds libraries available.

Thanks, I got those from Marco's link he posted.

> Relatively, although I would not say it is on par with e.g. Firebird, Postgres.

I'm only writing a small tool for monitoring a directory and importing
CSV files. Not much data at a time, so I don't believe I'll stress SqlDB

>> * What version of MS SQL Server is supported?
> Any version that FreeTDS supports (up to 2008, if memory serves me well)

Umm, I tested on MSSQL 2008 and it works fine, but the tool is
ultimately going to run against MSSQL Express 2012. I'll have to do some
more testing.

> I think yes, I don't think that MS-SQL server still provides a native client library,
> it uses ADO as the 'native' layer.

That seems to be the case. I couldn't find the native client library
anywhere. So in the end opted for the pre-compiled freetds libraries. So
far so good.

>> While I'm at it, has anybody implemented MS SQL Server support in tiOPF?
> Not to my knowledge.

No worries. In the end it took me a whopping 10 minutes to add a new
MSSQL persistence layer. :-) I haven't run the unit tests yet, but basic
CRUD functionality seems to work just fine.

My biggest issue today.... TDatetime handling. They caused INSERT
statements to fail. In the end I found the problem. I use TIMESTAMP data
type (like I'm used to under Firebird), but apparent for MSSQL that data
type has nothing to do with date/time info. I was meant to use the
DATETIME data type. After that, all worked well. :-)

  - Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal

More information about the fpc-pascal mailing list