[Mono-list] Patch for mono-1-0 - sqlsharp

Daniel Morgan danielmorgan@verizon.net
Sat, 30 Oct 2004 22:53:30 -0400


This is a multi-part message in MIME format.

------=_NextPart_000_0005_01C4BED3.46BC50E0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit

Lupus, Miguel, or Uma:

Can someone approve this patch please?

Here is the ChangeLog entry:

2004-10-30  Daniel Morgan <danielmorgan@verizon.net>

    Retrofit changes from HEAD to mono-1-0 release
    
    2004-10-21  Daniel Morgan <danielmorgan@verizon.net>

	* SqlSharpCli.cs: removed obsolete providers (Mono.Data.MySql, 
	Mono.Data.PostgreSqlClient, Mono.Data.DB2Client), 
	added provider for FirebirdSql.Data.Firebird, fixed 
	loading of external providers so they work with
	Mono having a GAC
	
	* README: added connection string for Firebird SQL 
	and removed old stuff



------=_NextPart_000_0005_01C4BED3.46BC50E0
Content-Type: text/plain;
	name="diff.txt"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="diff.txt"

? diff.txt=0A=
Index: ChangeLog=0A=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A=
RCS file: /cvs/public/mcs/tools/SqlSharp/ChangeLog,v=0A=
retrieving revision 1.15=0A=
diff -u -r1.15 ChangeLog=0A=
--- ChangeLog	9 Jun 2004 08:08:03 -0000	1.15=0A=
+++ ChangeLog	31 Oct 2004 01:25:05 -0000=0A=
@@ -1,3 +1,18 @@=0A=
+2004-10-30  Daniel Morgan <danielmorgan@verizon.net>=0A=
+=0A=
+    Retrofit changes from HEAD to mono-1-0 release=0A=
+    =0A=
+    2004-10-21  Daniel Morgan <danielmorgan@verizon.net>=0A=
+=0A=
+	* SqlSharpCli.cs: removed obsolete providers (Mono.Data.MySql, =0A=
+	Mono.Data.PostgreSqlClient, Mono.Data.DB2Client), =0A=
+	added provider for FirebirdSql.Data.Firebird, fixed =0A=
+	loading of external providers so they work with=0A=
+	Mono having a GAC=0A=
+	=0A=
+	* README: added connection string for Firebird SQL =0A=
+	and removed old stuff=0A=
+=0A=
 2004-06-09  Raja R Harinath  <rharinath@novell.com>=0A=
 =0A=
 	* Makefile (HAS_TEST): Remove.=0A=
Index: README=0A=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A=
RCS file: /cvs/public/mcs/tools/SqlSharp/README,v=0A=
retrieving revision 1.5=0A=
diff -u -r1.5 README=0A=
--- README	20 Jan 2003 23:14:46 -0000	1.5=0A=
+++ README	31 Oct 2004 01:25:05 -0000=0A=
@@ -1,7 +1,7 @@=0A=
-SQL# CLI - SQL Sharp Command Line Interface=0A=
-=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A=
+Mono SQL Query - Command Line Interface=0A=
+=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A=
 =0A=
-Running SQL# CLI on Mono:=0A=
+Running SQL Query on Mono:=0A=
 	mono sqlsharp.exe=0A=
 =0A=
 Use this tool to test connection strings and enter SQL queries =0A=
@@ -36,12 +36,10 @@=0A=
 	Microsoft SQL Server via System.Data.SqlClient or Mono.Data.TdsClient =
provider:=0A=
 		SQL# \ConnectionString Server=3DDANPC;Database=3Dpubs;User =
ID=3Ddanmorg;Password=3Dfreetds=0A=
 		=0A=
-	PostgreSQL via Mono.Data.PostgreSqlClient provider:=0A=
-		SQL# \ConnectionString =
host=3Dlocalhost;dbname=3Dtest;user=3Dpostgres;pass=3Dfun2db=0A=
-		          or=0A=
+	PostgreSQL via Npgsql provider:=0A=
 		SQL# \ConnectionString Server=3Dlocalhost;Database=3Dtest;User =
ID=3Dpostgres;Password=3Dfun2db=0A=
 		=0A=
-	MySQL via Mono.Data.MySql provider:=0A=
+	MySQL via ByteFX.Data.MySqlClient provider:=0A=
 		SQL# \ConnectionString Server=3Dlocalhost;Database=3Dtest;User =
ID=3Dmysql;Password=3D=0A=
 		=0A=
 	ODBC via System.Data.Odbc provider using a DSN named "MSSQLDSN"	I set =
up =0A=
@@ -58,33 +56,25 @@=0A=
 		=0A=
 	Oracle via System.Data.OracleClient=0A=
 		SQL# \ConnectionString Data Source=3Dtestdb;User =
ID=3Dscott;Password=3Dtiger=0A=
-		=0A=
-	IBM DB2 Universal Database via Mono.Data.DB2Client=0A=
-		SQL# \ConnectionString DSN=3Dsample;User =
ID=3Ddb2admin;Password=3Dmysecret	=0A=
-		=0A=
-	Npgsql (.NET PostgreSQL) from =
http://gborg.postgresql.org/project/npgsql/projdisplay.php=0A=
-		SQL# \ConnectionString Server=3Dlocalhost;Database=3Dtest;User =
ID=3Dpostgres;Password=3Dfun2db=0A=
-		=0A=
-	MySQLNet (ByteFX MySQL) from http://sourceforge.net/projects/mysqlnet/=0A=
-		SQL# \ConnectionString Server=3Dlocalhost;Database=3Dtest;User =
ID=3Dmysql;Password=3D=0A=
+=0A=
+    FirebirdSql via FirebirdSql.Data.Firebird (not included with Mono)=0A=
+ 		SQL# \ConnectionString =
Database=3DC:\FIREBIRD\EXAMPLES\EMPLOYEE.FDB;User=3DSYSDBA;Password=3Dmas=
terkey;Dialect=3D3;Server=3Dlocalhost=0A=
+	=0A=
 =0A=
 \Provider to set the Provider:=0A=
 =0A=
     Provider    Name          Namespace                  Assembly=0A=
     =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=0A=
-	OleDb       OLE DB        System.Data.OleDb          System.Data =0A=
+	OleDb       OLE DB        System.Data.OleDb          System.Data  =0A=
 	SqlClient   MS SQL 7/2000 System.Data.SqlClient      System.Data=0A=
 	Odbc        ODBC          System.Data.Odbc           System.Data=0A=
-	----------- ------------- -------------------------- =
--------------------------=0A=
-	MySql       MySQL         Mono.Data.MySql            Mono.Data.MySql=0A=
-	PostgreSql  PostgreSQL    Mono.Data.PostgreSqlClient =
Mono.Data.PostgreSqlClient=0A=
 	Sqlite      SQL Lite      Mono.Data.SqliteClient     =
Mono.Data.SqliteClient=0A=
 	Sybase      Sybase        Mono.Data.SybaseClient     =
Mono.Data.SybaseClient=0A=
 	Tds         TDS Generic   Mono.Data.TdsClient        =
Mono.Data.TdsClient=0A=
 	Oracle      Oracle 8i     System.Data.OracleClient   =
System.Data.OracleClient=0A=
-	----------- ------------- -------------------------- =
--------------------------=0A=
-	Npgsql       NET Postgres Npgsql                     Npgsql=0A=
-	MySQLNet     ByteFX MySQL ByteFX.Data.MySQLClient    ByteFX.Data=0A=
+	PostgreSql  NET Postgres  Npgsql                     Npgsql=0A=
+	MySql       ByteFX MySQL  ByteFX.Data.MySqlClient    ByteFX.Data=0A=
+	Firebird    Firebird      FirebirdSql.Data.Firebird  =
FirebirdSql.Data.Firebird=0A=
 	=0A=
 	Example: to set the provider for MySQL:=0A=
 		SQL# \provider mysql=0A=
Index: SqlSharpCli.cs=0A=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A=
RCS file: /cvs/public/mcs/tools/SqlSharp/SqlSharpCli.cs,v=0A=
retrieving revision 1.22=0A=
diff -u -r1.22 SqlSharpCli.cs=0A=
--- SqlSharpCli.cs	28 Sep 2003 10:49:50 -0000	1.22=0A=
+++ SqlSharpCli.cs	31 Oct 2004 01:25:05 -0000=0A=
@@ -1,30 +1,15 @@=0A=
 //=0A=
-// SqlSharpCli.cs - main driver for SQL# Command Line Interface=0A=
+// SqlSharpCli.cs - main driver for Mono SQL Query Command Line =
Interface=0A=
 //                  found in mcs/tools/SqlSharp=0A=
 //=0A=
-//                  SQL# is a SQL query tool allowing to enter queries =
and get=0A=
-//                  back results displayed to the console, to an html =
file, or=0A=
-//                  an xml file.  SQL non-query commands and aggregates =
can be=0A=
-//                  can be entered too.=0A=
-//=0A=
-//                  Can be used to test the various data providers in =
Mono=0A=
-//                  and data providers external to Mono.=0A=
-//=0A=
-//                  There is a GTK# version of SQL# =0A=
-//                  found in mcs/tools/SqlSharp/gui/gtk-sharp=0A=
-//=0A=
 //                  This program is included in Mono and is licenced =
under the GPL.=0A=
 //                  http://www.fsf.org/licenses/gpl.html  =0A=
 //=0A=
 //                  For more information about Mono, =0A=
-//                  visit http://www.go-mono.com/=0A=
+//                  visit http://www.mono-project.com/=0A=
 //=0A=
-// To build SqlSharpCli.cs on Linux:=0A=
-// $ mcs SqlSharpCli.cs -r System.Data.dll=0A=
-//=0A=
-// To build SqlSharpCli.exe on Windows:=0A=
-// $ mono c:/cygwin/home/someuser/mono/install/bin/mcs.exe \ =0A=
-//        SqlSharpCli.cs -r System.Data.dll=0A=
+// To build SqlSharpCli.cs=0A=
+// $ mcs SqlSharpCli.cs /r:System.Data.dll=0A=
 //=0A=
 // To run with mono:=0A=
 // $ mono SqlSharpCli.exe=0A=
@@ -36,9 +21,9 @@=0A=
 // $ cat commands.txt | mono SqlSharpCli.exe > results.txt=0A=
 //=0A=
 // Author:=0A=
-//    Daniel Morgan <danmorg@sc.rr.com>=0A=
+//    Daniel Morgan <danielmorgan@verizon.net>=0A=
 //=0A=
-// (C)Copyright 2002 Daniel Morgan=0A=
+// (C)Copyright 2002-2004 Daniel Morgan=0A=
 //=0A=
 =0A=
 using System;=0A=
@@ -686,9 +671,6 @@=0A=
 			DbDataAdapter adapter =3D null;=0A=
 =0A=
 			switch(provider) {=0A=
-			case "ODBC":=0A=
-				//adapter =3D (DbDataAdapter) new OdbcDataAdapter ();=0A=
-				break;=0A=
 			case "OLEDB":=0A=
 				adapter =3D (DbDataAdapter) new OleDbDataAdapter ();=0A=
 				break;=0A=
@@ -734,8 +716,8 @@=0A=
 			Console.WriteLine(@"Type:  \Q to quit");=0A=
 			Console.WriteLine(@"       \ConnectionString to set the =
ConnectionString");=0A=
 			Console.WriteLine(@"       \Provider to set the Provider:");=0A=
-			Console.WriteLine(@"                 =
{OleDb,SqlClient,MySql,MySqlNet,Odbc,DB2,");=0A=
-			Console.WriteLine(@"                  =
Oracle,PostgreSql,Npgsql,Sqlite,Sybase,Tds)");=0A=
+			Console.WriteLine(@"                 =
{OleDb,SqlClient,MySql,Odbc,DB2,");=0A=
+			Console.WriteLine(@"                  =
Oracle,PostgreSql,Sqlite,Sybase,Tds)");=0A=
 			Console.WriteLine(@"       \Open to open the connection");=0A=
 			Console.WriteLine(@"       \Close to close the connection");=0A=
 			Console.WriteLine(@"       \e to execute SQL query (SELECT)");=0A=
@@ -750,8 +732,8 @@=0A=
 			Console.WriteLine(@"Type:  \Q to quit");=0A=
 			Console.WriteLine(@"       \ConnectionString to set the =
ConnectionString");=0A=
 			Console.WriteLine(@"       \Provider to set the Provider:");=0A=
-			Console.WriteLine(@"                 =
{OleDb,SqlClient,MySql,MySqlNet,Odbc,MSODBC,DB2,");=0A=
-			Console.WriteLine(@"                  =
Oracle,PostgreSql,Npgsql,Sqlite,Sybase,Tds}");=0A=
+			Console.WriteLine(@"                 =
{OleDb,SqlClient,MySql,Odbc,MSODBC,");=0A=
+			Console.WriteLine(@"                  =
Oracle,PostgreSql,Sqlite,Sybase,Tds}");=0A=
 			Console.WriteLine(@"       \Open to open the connection");=0A=
 			Console.WriteLine(@"       \Close to close the connection");=0A=
 			Console.WriteLine(@"       \e to execute SQL query (SELECT)");=0A=
@@ -885,25 +867,16 @@=0A=
 				case "ORACLE":=0A=
 					extp =3D new string[3] {=0A=
 								     "\\loadextprovider",=0A=
-								     "System.Data.OracleClient",=0A=
+								     @"System.Data.OracleClient, Version=3D1.0.5000.0, =
Culture=3Dneutral, PublicKeyToken=3Db77a5c561934e089",=0A=
 								     "System.Data.OracleClient.OracleConnection"};=0A=
 					SetupExternalProvider(extp);=0A=
 					UseParameters =3D false;=0A=
 					UseSimpleReader =3D false;=0A=
 					break;=0A=
-				case "DB2":=0A=
-					extp =3D new string[3] {=0A=
-								     "\\loadextprovider",=0A=
-								     "Mono.Data.DB2Client",=0A=
-								     "Mono.Data.DB2Client.DB2ClientConnection"};=0A=
-					SetupExternalProvider(extp);=0A=
-					UseParameters =3D false;=0A=
-					UseSimpleReader =3D true;=0A=
-					break;=0A=
 				case "TDS":=0A=
 					extp =3D new string[3] {=0A=
 								     "\\loadextprovider",=0A=
-								     "Mono.Data.TdsClient",=0A=
+									 @"Mono.Data.TdsClient, Version=3D1.0.5000.0, =
Culture=3Dneutral, PublicKeyToken=3D0738eb9f132ed756",=0A=
 								     "Mono.Data.TdsClient.TdsConnection"};=0A=
 					SetupExternalProvider(extp);=0A=
 					UseParameters =3D false;=0A=
@@ -912,35 +885,27 @@=0A=
 				case "SYBASE":=0A=
 					extp =3D new string[3] {=0A=
 								     "\\loadextprovider",=0A=
-								     "Mono.Data.SybaseClient",=0A=
+								     @"Mono.Data.SybaseClient, Version=3D1.0.5000.0, =
Culture=3Dneutral, PublicKeyToken=3D0738eb9f132ed756",=0A=
 								     "Mono.Data.SybaseClient.SybaseConnection"};=0A=
 					SetupExternalProvider(extp);=0A=
 					UseParameters =3D false;=0A=
 					UseSimpleReader =3D false;=0A=
 					break;=0A=
 				case "MYSQL":=0A=
-					extp =3D new string[3] {=0A=
-								     "\\loadextprovider",=0A=
-								     "Mono.Data.MySql",=0A=
-								     "Mono.Data.MySql.MySqlConnection"};=0A=
-					SetupExternalProvider(extp);=0A=
-					UseParameters =3D false;=0A=
-					UseSimpleReader =3D false;=0A=
-					break;=0A=
 				case "MYSQLNET":=0A=
 					extp =3D new string[3] {=0A=
 								     "\\loadextprovider",=0A=
-								     "ByteFX.Data",=0A=
-								     "ByteFX.Data.MySQLClient.MySQLConnection"};=0A=
+								     @"ByteFX.Data, Version=3D0.7.6.1, Culture=3Dneutral, =
PublicKeyToken=3D0738eb9f132ed756",=0A=
+								     "ByteFX.Data.MySqlClient.MySqlConnection"};=0A=
 					SetupExternalProvider(extp);=0A=
 					UseParameters =3D false;=0A=
 					UseSimpleReader =3D false;=0A=
 					break;=0A=
 				case "SQLITE":=0A=
 					extp =3D new string[3] {=0A=
-								     "\\loadextprovider",=0A=
-								     "Mono.Data.SqliteClient",=0A=
-								     "Mono.Data.SqliteClient.SqliteConnection"};=0A=
+								    "\\loadextprovider",=0A=
+									@"Mono.Data.SqliteClient, Version=3D1.0.5000.0, =
Culture=3Dneutral, PublicKeyToken=3D0738eb9f132ed756",=0A=
+								    "Mono.Data.SqliteClient.SqliteConnection"};=0A=
 					SetupExternalProvider(extp);=0A=
 					UseParameters =3D false;=0A=
 					UseSimpleReader =3D true;=0A=
@@ -950,20 +915,20 @@=0A=
 					UseSimpleReader =3D false;=0A=
 					provider =3D parm;=0A=
 					break;=0A=
-				case "ODBC":=0A=
+				case "ODBC": // for MS NET 1.1 and above=0A=
 					extp =3D new string[3] {=0A=
-											 "\\loadextprovider",=0A=
-											 "System.Data",=0A=
-											 "System.Data.Odbc.OdbcConnection"};=0A=
+									"\\loadextprovider",=0A=
+									@"System.Data, Version=3D1.0.5000.0, Culture=3Dneutral, =
PublicKeyToken=3Db77a5c561934e089",=0A=
+									"System.Data.Odbc.OdbcConnection"};=0A=
 					SetupExternalProvider(extp);=0A=
 					UseParameters =3D false;=0A=
 					UseSimpleReader =3D false;=0A=
 					break;=0A=
-				case "MSODBC":=0A=
+				case "MSODBC": // for MS NET 1.0=0A=
 					extp =3D new string[3] {=0A=
-												"\\loadextprovider",=0A=
-												@"Microsoft.Data.Odbc, Culture=3Dneutral, =
PublicKeyToken=3Db77a5c561934e089, Version=3D1.0.3300.0",=0A=
-												"Microsoft.Data.Odbc.OdbcConnection"};=0A=
+									"\\loadextprovider",=0A=
+									@"Microsoft.Data.Odbc, Culture=3Dneutral, =
PublicKeyToken=3Db77a5c561934e089, Version=3D1.0.3300.0",=0A=
+									"Microsoft.Data.Odbc.OdbcConnection"};=0A=
 					SetupExternalProvider(extp);=0A=
 					UseParameters =3D false;=0A=
 					UseSimpleReader =3D false;=0A=
@@ -973,19 +938,20 @@=0A=
 					UseSimpleReader =3D true;=0A=
 					provider =3D parm;=0A=
 					break;=0A=
-				case "POSTGRESQL":=0A=
+				case "FIREBIRD":=0A=
 					extp =3D new string[3] {=0A=
-								     "\\loadextprovider",=0A=
-								     "Mono.Data.PostgreSqlClient",=0A=
-								     "Mono.Data.PostgreSqlClient.PgSqlConnection"};=0A=
+									"\\loadextprovider",=0A=
+									@"FirebirdSql.Data.Firebird, Version=3D1.6.3.0, =
Culture=3Dneutral, PublicKeyToken=3De1b4f92304d7b12f",=0A=
+									"FirebirdSql.Data.Firebird.FbConnection"};=0A=
 					SetupExternalProvider(extp);=0A=
 					UseParameters =3D false;=0A=
 					UseSimpleReader =3D false;=0A=
 					break;=0A=
+				case "POSTGRESQL":=0A=
 				case "NPGSQL":=0A=
 					extp =3D new string[3] {=0A=
 								     "\\loadextprovider",=0A=
-								     "Npgsql",=0A=
+								     @"Npgsql, Version=3D1.0.5000.0, Culture=3Dneutral, =
PublicKeyToken=3D5d8b90d52f46fda7",=0A=
 								     "Npgsql.NpgsqlConnection"};=0A=
 					SetupExternalProvider(extp);=0A=
 					UseParameters =3D false;=0A=

------=_NextPart_000_0005_01C4BED3.46BC50E0--