Welcome to mirror list, hosted at ThFree Co, Russian Federation.

tds-providers « web - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 6442e69601aefb040f7b2c2673780fc7747a4184 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
* Design of the Microsoft SQL Server, Sybase, and TDS Data Providers in Mono

	<ul>
		* After much discussion among the Mono ADO.NET developers,
		  we have come up with the design of implementing a Sybase, Microsoft 
		  SQL Server, and TDS Generic ADO.NET providers.  These providers have
		  been created and are actively developed by Tim Coleman.

		* Since Sybase and Microsoft SQL Server databases both 
		  use the TDS protocol for data access, and other implementations 
		  of TDS (FreeTDS and jTDS) have included support for multiple 
		  versions of the TDS, we have decided to do the same.

		* The TdsClient ADO.NET provider will be Mono's first provider 
		  written completely in C# without any dependencies except 
		  the usual suspects: corlib.dll, System.dll, and System.Xml.dll.
	</ul>

* New ADO.NET Providers

<p>There will be three ADO.NET providers that will use TDS.	

		<ol>
		  <li><p>Mono.Data.SybaseClient namepace and assembly will 
		  hold the ADO.NET provider for Sybase SQL Server database.  
		  This provider uses TDS version 5.0 which 
		  can only be used with Sybase databases.

		  <li><p>System.Data.SqlClient namespace and System.Data assembly 
		  will hold the ADO.NET provider
          for Microsoft SQL Server 7.0/2000 databases.  This provider is to be 
          compatible with SqlClient in Microsoft .NET and uses TDS version 7.0 
          which only supports Microsoft SQL Server 7.0/2000.  
          There is TDS version 8.0 
          which we will need to support as well, but it is used for 
          Microsoft SQL Server 2000 databases.

		  <li><p>Mono.Data.TdsClient namespace and assembly is a generic 
		  provider for older TDS databases.  This provider will default to 
		  using TDS version 4.2 which can be used by older Sybase and 
		  Microsoft SQL Server databases.
		 </ol>

* Building The New Providers

 <p> All three providers will use common internal code 
		at Mono.Data.TdsClient.Internal.  Any classes in 
		Mono.Data.TdsClient.Internal will have the internal 
		keyword and will be built with the assembly of that provider.
		<ol>
		<li><p>SqlClient will build its assembly System.Data using files 
		  from System.Data, System.Data.SqlClient, System.Data.SqlTypes, 
		  System.Data.Common, and Mono.Data.TdsClient.Internal.  
		 
		  <p>SqlClient 
		  will only reference the usual
		  suspects: corlib.dll, System.dll, and System.Xml.dll. SqlClient will be 
		  a wrapper around TdsClient.Internal, but provide specific functionality to
		  Microsoft SQL Server 7.0/2000 databases.

		  <p>SqlClient build example:

<pre>
 mcs -target:library -out:System.Data.dll \
   System.Data.SqlClient/*.cs \
   ..\Mono.Data.TdsClient\Mono.Data.TdsClient.Internal\*.cs \
   [any other classes in System.Data assembly...]  \
   -r corlib.dll -r System.dll -r System.Xml.dll
</pre>

		<li><p>SybaseClient will build its assembly Mono.Data.SybaseClient using 
		  files from Mono.Data.SybaseClient and Mono.Data.TdsClient.Internal.  
		  SybaseClient will reference
          the usual suspects plus System.Data.dll  SybaseClient will 
          be a wrapper around TdsClient.Internal, but provide specific 
          functionality to Sybase.

		  <p>SybaseClient build example:

<pre>
 mcs -target:library -out:Mono.Data.SybaseClient.dll \
    Mono.Data.SybaseClient\*.cs \
    ..\Mono.Data.TdsClient\Mono.Data.TdsClient.Internal\*.cs
    -r corlib.dll -r System.dll -r System.Xml.dll -r System.Data.dll
</pre>
    
		<li><p>TdsClient will build its assembly Mono.Data.TdsClient 
		  using files from Mono.Data.TdsClient
          and Mono.Data.TdsClient.Internal.  TdsClient will reference the 
          usual suspects plus System.Data.dll  TdsClient is a wrapper 
          provider around TdsClient.Internal used for generic
          unit tests.  TdsClient will a wrapper around TdsClient.Internal 
          as a generic TDS provider 
          and allow TDS configuration options not exposed in SqlClient 
          nor SybaseClient, such as, TdsVersion will be exposed in TdsClient 
          but not in SqlClient nor SybaseClient.

		 <p>TdsClient build example:

<pre>
mcs -target:library -out:Mono.Data.TdsClient.dll \
    Mono.Data.TdsClient\*.cs \
    Mono.Data.TdsClient.Internal\*.cs \
    -r corlib.dll -r System.dll -r System.Xml.dll -r System.Data.dll
</pre>
		</ol>
    
* Classes in Mono.Data.TdsClient.Internal will:

	<ul>
	<li>use the internal keyword to prevent exposing these classes
          to the System.Data.dll assembly.
          
    <li> implement the ADO.NET interfaces just like any other ADO.NET provider, such as,
          IDbConnection, IDbCommand, IDataReader, IDataRecord, IDataAdapter, etc...
          
    <li> be sealed just like other providers
        
    <li> provide features to be directly used by the SqlClient and SybaseClient 
          providers, such
          as, setting the default TDS version: SqlClient to 7.0 and SybaseClient 
          to 5.0 and TdsClient to 4.2.
          
    <li> be written completely in C# or IL assembly language (if need be).
        
    <li> implement the TDS protocol version 4.2, 5.0, 7.0, and 8.0. This 
          is where most of the
          work will take place.
          
    <li> be an internal ADO.NET provider to the public ADO.NET providers:
          System.Data.SqlClient, Mono.Data.SybaseClient, and Mono.Data.TdsClient.
	</ul>

* Implementation Details of the TDS Protocol

	<ul>
		* will be implemented in pure C# from scratch
		
		* will reside in Mono.Data.TdsClient.Internal  
		
		* will use FreeTDS and jTDS as rerferences.
	</ul>

* More Information

	<ul>
		* <a href="http://www.freetds.org/">FreeTDS</a> is C API that implements
		the TDS protocol.  Has libraries for tds, ctlib, and dblib.  It builds
		and runs on Windows, Linux, and other platforms.  FreeTDS provides
		data access to Microsoft SQL Server and Sybase databases. 
		
		* <a href="http://jtds.sf.net/">jTDS</a> is a 100% Java JDBC provider
		for Microsoft SQL Server and Sybase databases.
		
		* <a href="http://www.freetds.org/tds.html">TDS Protocol</a>
	</ul>

* Contribute

	<p>Anybody willing to help?  If so, 
		contact any of the people working on the ADO.NET support 
		in Mono: Rodrigo Moya, Tim Coleman, Daniel Morgan, Brian Ritchie, 
		Vladimir Vukicevic, Ville Palo, Franklin Wise, and others.