[Mono-list] Sybase and Microsoft SQL Server database support in Mono ADO.NET

Rodrigo Moya rodrigo@ximian.com
16 Oct 2002 16:55:20 +0200

On Wed, 2002-10-16 at 15:59, Daniel Morgan wrote:
> Hey,
> Currently, ADO.NET in Mono does not support Sybase nor Microsoft SQL Server.
> Unless, you want to use System.Data.Odbc with unixODBC with FreeTDS on
> Linux, System.Data.OleDb with libgda with FreeTDS on Linux, or with the
> native ODBC support and MDAC on Windows.  However, this adds a lot of
> dependencies, configurations, and another layer for data to have to travel
> degrading performance.
> I would like to create a provider for Microsoft SQL Server in
> System.Data.SqlClient and for Sybase in Mono.Data.SybaseClient.  It will use
> the native FreeTDS libraries to provide this capability.  In order to use
> FreeTDS, we will need to create C# bindings to FreeTDS.
hmm, if using FreeTDS, one implementation should be able to connect to
both databases. So I think it would be a good idea to have a
System.Data.TDS provider, and have then SD.SqlClient and MD.SybaseClient
just inherit from it.

> Is there a way that the C# bindings to FreeTDS could be used statically by
> both assemblies:
> System.Data.dll and Mono.Data.SybaseClient.dll?  The FreeTDS C# bindings
> could go in Mono.Data.FreeTDS.  This way, we would not have to maintain two
> copies of the C# bindings to FreeTDS.  Can mono/mcs create static libraries
> or assemblies?  If not, I can always get the build files for System.Data and
> Mono.Data.SybaseClient to point to the Mono.Data.FreeTDS C# files to build
> as well.

> The best approach is to create a pure managed provider in C#, but who has
> the time to implement the TDS protocol in C#?  In the meantime, we can use
> the native FreeTDS libraries for this.
> There is jTDS at http://www.freetds.org/ but that involves time porting from
> Java/JFC/JDBC to the C#/.NET/ADO.NET stuff.
there is a jTDS JDBC driver that was based on FreeTDS, and then just
forked from it. This means it is implementing the TDS protocol directly.
Maybe that jTDS could be ported to C#.

> FreeTDS can be found at http://www.freetds.org/  and builds and installs on
> Linux and Windows.
> For Windows, you will have to check out the latest freetds from cvs because
> it includes fixes to build and install on Windows.
> See http://www.freetds.org/faq.html#How%20to%20I%20access%20the%20CVS
> on how to check out freetds from cvs.
> Before Microsoft SQL Server support at System.Data.SqlClient can begin, the
> PostgreSQL provider at System.Data.SqlClient will have to be moved to
> Mono.Data.PostgreSqlClient.  Can someone move this in cvs for me so we will
> not lose history?
Miguel can do it, AFAIK.

Rodrigo Moya <rodrigo@ximian.com>