Author: borisk
Date: 2005-11-16 05:18:00 -0500 (Wed, 16 Nov 2005)
New Revision: 53102
Modified:
trunk/mcs/class/System.Data/System.Data.OleDb.jvm/ChangeLog
trunk/mcs/class/System.Data/System.Data.OleDb.jvm/OleDbConnection.cs
trunk/mcs/class/System.Data/System.Data.ProviderBase.jvm/AbstractDBConnection.cs
trunk/mcs/class/System.Data/System.Data.ProviderBase.jvm/ChangeLog
trunk/mcs/class/System.Data/System.Data.SqlClient.jvm/ChangeLog
trunk/mcs/class/System.Data/System.Data.SqlClient.jvm/SqlConnection.cs
Log:
TARGET_JVM fix. Throw exception if MSSQL port resolution failed.
Modified: trunk/mcs/class/System.Data/System.Data.OleDb.jvm/ChangeLog
===================================================================
--- trunk/mcs/class/System.Data/System.Data.OleDb.jvm/ChangeLog 2005-11-16
10:02:39 UTC (rev 53101)
+++ trunk/mcs/class/System.Data/System.Data.OleDb.jvm/ChangeLog 2005-11-16
10:18:00 UTC (rev 53102)
@@ -1,3 +1,6 @@
+2005-16-11 Boris Kirzner <[EMAIL PROTECTED]>
+ * OleDbConnection.cs: Added override for CreateException().
+
2005-11-07 Konstantin Triger <[EMAIL PROTECTED]>
* OleDbConnection.cs: retrieve the StringManager from AppDomain
Modified: trunk/mcs/class/System.Data/System.Data.OleDb.jvm/OleDbConnection.cs
===================================================================
--- trunk/mcs/class/System.Data/System.Data.OleDb.jvm/OleDbConnection.cs
2005-11-16 10:02:39 UTC (rev 53101)
+++ trunk/mcs/class/System.Data/System.Data.OleDb.jvm/OleDbConnection.cs
2005-11-16 10:18:00 UTC (rev 53102)
@@ -247,6 +247,11 @@
return new OleDbException(e,this);
}
+ protected override SystemException CreateException(string
message)
+ {
+ return new OleDbException(message, null, this);
+ }
+
public DataTable GetOleDbSchemaTable (Guid schema, object[]
restrictions)
{
DataTable schemaTable = new DataTable("Tables");
Modified:
trunk/mcs/class/System.Data/System.Data.ProviderBase.jvm/AbstractDBConnection.cs
===================================================================
---
trunk/mcs/class/System.Data/System.Data.ProviderBase.jvm/AbstractDBConnection.cs
2005-11-16 10:02:39 UTC (rev 53101)
+++
trunk/mcs/class/System.Data/System.Data.ProviderBase.jvm/AbstractDBConnection.cs
2005-11-16 10:18:00 UTC (rev 53102)
@@ -574,7 +574,9 @@
}
// todo : what should we do if
all the timeout spent on port resolution ?
if ("-1".Equals(port)) {
- port =
StringManager.GetString("SQL_CON_PORT", "1433"); //default port of MSSql Server
3167.
+ string message =
String.Format ("Unable to retrieve the port number for {0} using UDP on port
1434. Please see your network administrator to solve this problem or add the
port number of your SQL server instance to your connection string (i.e.
port=1681).",ServerName);
+ Exception e =
CreateException (message);
+ throw e;
}
ConnectionStringHelper.AddValue(UserParameters,StringManager.GetStringArray("CON_PORT"),port);
break;
@@ -705,6 +707,8 @@
protected abstract SystemException CreateException(SQLException
e);
+ protected abstract SystemException CreateException(string
message);
+
public override void Close()
{
try {
Modified: trunk/mcs/class/System.Data/System.Data.ProviderBase.jvm/ChangeLog
===================================================================
--- trunk/mcs/class/System.Data/System.Data.ProviderBase.jvm/ChangeLog
2005-11-16 10:02:39 UTC (rev 53101)
+++ trunk/mcs/class/System.Data/System.Data.ProviderBase.jvm/ChangeLog
2005-11-16 10:18:00 UTC (rev 53102)
@@ -1,3 +1,7 @@
+2005-16-11 Boris Kirzner <[EMAIL PROTECTED]>
+ * AbstractDBConnection.cs: TARGET_JVM fix. Throw exception if MSSQL port
+ resolution failed.
+
2005-14-11 Boris Kirzner <[EMAIL PROTECTED]>
* AbstractDBCommand.cs: TARGET_JVM fix. Provider name can be in any
case..
Modified: trunk/mcs/class/System.Data/System.Data.SqlClient.jvm/ChangeLog
===================================================================
--- trunk/mcs/class/System.Data/System.Data.SqlClient.jvm/ChangeLog
2005-11-16 10:02:39 UTC (rev 53101)
+++ trunk/mcs/class/System.Data/System.Data.SqlClient.jvm/ChangeLog
2005-11-16 10:18:00 UTC (rev 53102)
@@ -1,3 +1,6 @@
+2005-16-11 Boris Kirzner <[EMAIL PROTECTED]>
+ * SqlConnection.cs: Added override for CreateException().
+
2005-09-14 Boris Kirzner <[EMAIL PROTECTED]>
* SqlConvert.cs: Fix SqlDbType to JDBC type convertion.
Modified: trunk/mcs/class/System.Data/System.Data.SqlClient.jvm/SqlConnection.cs
===================================================================
--- trunk/mcs/class/System.Data/System.Data.SqlClient.jvm/SqlConnection.cs
2005-11-16 10:02:39 UTC (rev 53101)
+++ trunk/mcs/class/System.Data/System.Data.SqlClient.jvm/SqlConnection.cs
2005-11-16 10:18:00 UTC (rev 53102)
@@ -212,6 +212,11 @@
return new SqlException(e, this);
}
+ protected override SystemException CreateException(string
message)
+ {
+ return new SqlException(message, null, this);
+ }
+
private void OnSqlInfoMessage (SqlInfoMessageEventArgs value)
{
if (InfoMessage != null) {
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches