mtangoo / wxDatabase

wxWidgets library for connecting to major relational database
http://mtangoo.github.io/database/index.html
37 stars 17 forks source link

Add Support for TDS in CMake #4

Open mtangoo opened 9 years ago

mtangoo commented 9 years ago

So far CMake build have Support for SQLite3, MySQL/MariaDB, and PostGreSQL. I would like to see TDS Suported so that one can connect with MS SQL Server. I'm not TDS guy and so its hard for me to sdo it.

Help is needed

mtangoo commented 9 years ago

@manyleaves can you take ownership of this to help on making it a reality? I will back you up in case you hit a wall somewhere with CMake

manyleaves commented 9 years ago

No problems. I'll take ownership of support of TDS. I'm just wrapped up with other priorities right now. In the meantime I'd like to ask everyone which underlying version(s) of TDS we should support. When I fixed up Joseph's original code I decided to use FreeTDS because it seems to be cross-platform. Normally on Windows, TDS is via Microsoft's own DLL's.

mtangoo commented 9 years ago

I'm not a know how on TDS, but reading around I cannot find any use case for TDS on Unix. Can you outline any use case apart from Windows? If there's such a case I suggest free TDS else we switch to MS TDS

patlkli commented 9 years ago

Personally, I don't like connecting to MSSQL databases using ODBC. I'd rather preserve FreeTDS in order to be able to directly access MSSQL or Sybase.

Maybe we could even use MS TDS if it's available on the target system and use FreeTDS otherwise. @manyleaves are the TDS DLLs from Microsoft always available on a Windows system or do you have to install some package from the SQL server?

mtangoo commented 9 years ago

just another foolish question, can we install or need Sybase/MSSQL from Linux or Mac?

patlkli commented 9 years ago

I guess you can't install it under non-Windows platforms. However, most of the time, you use some remote database and that just might be a MSSQL server which you want to use from a Linux/OS X system.

mtangoo commented 9 years ago

However, most of the time, you use some remote database and that just might be a MSSQL server which you want to use from a Linux/OS X system.

Am interested on this one. can you enlighten me on this specific use case? I use SQL server on Windows and have never dreamed you can access it in Linux (I use RDP always)

patlkli commented 9 years ago

You can access it via ODBC and via TDS.

mtangoo commented 9 years ago

Thanks. I didn't knew that :)

manyleaves commented 9 years ago

Microsoft dropped support for NTWDBLIB.DLL (the DB-Library API) that directly implements the Tabular Data Stream (TDS) for C/C++ after MS SQL Server 2000. Internally SQL Server and Sybase both use TDS at the raw data level but access is via the OLE DB, ODBC and other drivers. I remember when I picked up the TDS implementation within wxDatabase a couple of years ago I fixed a few memory leaks and crashes but it ran so much faster than the ODBC code for the MS SQL databases I was testing. I consciously decided to link in FreeTDS because it should provide fast raw access to *nix clients as well as the Win clients I was testing.

@mtangoo this link may be interesting to you. I can understand why this makes sense in a development environment but in a final install it would be better to have the DB server running on its native OS.

mtangoo commented 9 years ago

@manyleaves thanks for detailed explanation. I think we can get on with FreeTDS. The Link you provided is a missing link :)