X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=web%2Fado-net;h=0095d79ef79996374030641fce45c5c8a01272ac;hb=fefd0ee6a5f024ce8897d8286c4b1fa05b2b3770;hp=438b47cb2be195bf064f1998538d5e72a06cd26d;hpb=222fb82852d07d35d1c5a7bc145715d5d6cd07ab;p=mono.git
diff --git a/web/ado-net b/web/ado-net
index 438b47cb2be..0095d79ef79 100644
--- a/web/ado-net
+++ b/web/ado-net
@@ -1,44 +1,198 @@
* ADO.NET
- The coordinator for the ADO.NET implementation is Rodrigo Moya.
+** Data Access in Mono
-* Action plan
+
+ - Today, our goal is to be compatible with .NET 1.1 and .NET 1.0. We also would like
+ to extend data access beyond what is included with .NET 1.0 and .NET 1.1,
+ such as, include access to more databases, such as, PostgreSQL and MySQL,
+ but also provide classes that help in creating data source-agnostic code, such as,
+ Mono.Data.ProviderFactory.
+
+ - In the future, we would like to be compatible with .NET 1.2. This includes features
+ like ObjectSpaces
+
+
- The current plan to implement ADO.NET is as follows:
+** Bugs and Feature Requests
- Step 1: SqlClient:
+
+External Projects that have created ADO.NET Providers that work on Mono:
- Step 2: OleDBClient:
-
- * On Unix systems: System.Data.OleDb will use LibGDA as its
- engine.
+
- LibGDA is the data access engine that is used by
- Gnome-Db (only libgda, not libgnomedb at all).
+ - Firebird Interbase
is a
+ Firebird SQL Managed data provider. It can be used with Interbase databases too. It
+ is written in 100%C# and does not require a client library. Works on .NET and Mono.
+ - Npgsql is a
+ PostgreSQL Managed data provider written
+ in 100% C#, does not require a client library, and works on .NET and Mono
+ - MySQLNet is a
+ MySQL Managed data provider written in 100% C#, does not
+ require a client library, and works on .NET and Mono
+
- * On Windows systems: System.Data.OleDb will use OLE-DB as
- its engine.
-
+** Tools
+
+Some tools that can be used for ADO.NET and other technologies (ASP.NET, XML, etc).
+
+
+ - sqlsharp.exe
+
+ - SQL# is a command line query tool included with Mono to enter and execute SQL statements
+
+
+ - xsd.exe
+
+ - XML Schema Definition tool
+
+ - XDR to XSD - used to generate an XML schema from an XDR (XML Data Reduced schema) file.
+ XDR was used by Microsoft prior to XSD becoming a W3C recommendation. So, this needs
+ to be supported for legacy reasons
+ - XML to XSD - used to generate an XML schema from an XML file
+ - XSD to DataSet - used to generate DataSet classes from an XSD schema file. The
+ DataSet classes created can then be used with XML data
+ - XSD to Classes - used to generate classes from an XSD schema file. The
+ classes created can be used with System.XML.Serialization.XMLSerializer
+ to read and write XML code that follows the schema
+ - Classes to XSD - used to generate an XML schema
+ from type(s) in a assembly file. The
+ XML schema created by the tool defines the XML format used
+ by System.XML.Serialization.XMLSerializer
+
+
+
+
+
- Step 3: System.Data.SqlClient Providers:
+** Extra Classes in Mono ADO.NET
+ An ADO.NET Provider Factory
+ was created by Brian Ritchie. The
+ Provider Factory is a way to dynamically create
+ connections, commands, parameters, and data adapters based on configuration
+ information.
+
+** Database Access from ASP.NET
- * System.Data.SqlClient will then become a generic
- proxy for binding to other SQL implementations other
- than PostgreSQL (MySQL on Unix/Windows; MS SQL on
- Window; Interbase on Unix/Windows). Others are welcomed.
+ - Take a look at xsp in cvs and look at the examples in test: dbpage1.aspx
+ and dbpage2.aspx:
+
+ - Notice that the namespace System.Data is imported via import
+ - A NameValueCollection is gotten using ConfigurationSettings.AppSetings. These
+ settings are gotten from the file server.exe.config which is a XML file. The XML
+ file has a section appSettings. In the appSettings section, you have keys
+ for DBProviderAssembly, DBConnectionType, and DBConnectionString.
+
+ - DBProviderAssembly is the assembly of the ADO.NET provider.
+ For example:
+ "ByteFX.Data"
+ - DBConnectionType is the System.Type of the class that
+ implements System.Data.IDbConnection that is found
+ in the DBProviderAssembly.
+ For example:
+ "ByteFX.Data.MySqlConnection"
+ - DBConnectionString is the ConnectionString to set to the
+ IDbConnection object to use in opening a connection to a data source.
+ For Example:
+ "hostaddr=127.0.0.1;user=monotest;password=monotest;dbname=monotest"
+
+ - The function GetConnectionData() gets the database provider assembly, connection type,
+ and connection string parameters if they exist; otherwise, it uses default values. This is
+ done during the loading of the web page.
+ - With the connection parameters, the assembly is loaded, the connection type is verified that
+ it implements IDbConnection and an instance of the class can be created, creates a instance
+ of the class, sets the connection string, and opens the connection.
+
+
+** Testing
+
+
+ - Testing connection-oriented classes are done
+ via the provider specific tests
+ found in the mcs source at mcs/class
+
+
+ Name |
+ Assembly / Namespace |
+ Test |
+
+
+
+ Microsoft SQL Server |
+ System.Data / System.Data.SqlClient |
+ SqlTest.cs at System.Data/Test |
+
+
+
+ PostgreSQL (Npgsql) |
+ Npgsql / Npgsql |
+ *.cs at Npgsql/Test |
+
+
+
+ Oracle (Mono) |
+ System.Data.OracleClient / System.Data.OracleClient |
+ TestOracleClient.cs at System.Data.OracleClient/Test |
+
+
+
+ ODBC (Mono) |
+ System.Data.Odbc / System.Data |
+ OdbcTest.cs (to connect to MS SQL Server)at System.Data/Test |
+
+
+
+
+
+ - Testing non-connection classes are
+ done via mono's modified version of NUnit.
+
+ - To run all the NUnit tests for Mono, you need the mcs source. cd to the root
+ of the mcs source. To run it:
+
+
+ - If you just want to run the NUnit tests for System.Data, you would cd into
+ the mcs source at class/System.Data/Test and run it:
+
+
+
+
+
+
+