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

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGert Driesen <drieseng@users.sourceforge.net>2005-08-08 21:33:12 +0400
committerGert Driesen <drieseng@users.sourceforge.net>2005-08-08 21:33:12 +0400
commite496700e86f6ec0520bc14ec5c71ac3d8ce2df9c (patch)
tree820e195e095c8463b24d7f1b71143237cc354bc6 /mcs/class/System.Data/System.Data.OleDb
parent5f2664c2c357406340a1e6ce7b6a5648412e7940 (diff)
* OleDbDataAdapter.cs: Fixed custom attributes to match MS.NET.
* OleDbCommand.cs: Fixed custom attributes to match MS.NET. * OleDbParameter.cs: Fixed custom attribute to match MS.NET. * OleDbException.cs: Added ErrorTypeConverter, assigned to ErrorCode property to match MS.NET. * OleDbConnection.cs: Fixed custom attributes to match MS.NET. svn path=/trunk/mcs/; revision=48142
Diffstat (limited to 'mcs/class/System.Data/System.Data.OleDb')
-rw-r--r--mcs/class/System.Data/System.Data.OleDb/ChangeLog9
-rw-r--r--mcs/class/System.Data/System.Data.OleDb/OleDbCommand.cs14
-rw-r--r--mcs/class/System.Data/System.Data.OleDb/OleDbConnection.cs18
-rw-r--r--mcs/class/System.Data/System.Data.OleDb/OleDbDataAdapter.cs20
-rw-r--r--mcs/class/System.Data/System.Data.OleDb/OleDbException.cs14
-rw-r--r--mcs/class/System.Data/System.Data.OleDb/OleDbParameter.cs27
6 files changed, 60 insertions, 42 deletions
diff --git a/mcs/class/System.Data/System.Data.OleDb/ChangeLog b/mcs/class/System.Data/System.Data.OleDb/ChangeLog
index 090a021b86c..f5a4232bc2b 100644
--- a/mcs/class/System.Data/System.Data.OleDb/ChangeLog
+++ b/mcs/class/System.Data/System.Data.OleDb/ChangeLog
@@ -1,3 +1,12 @@
+2005-08-08 Gert Driesen <drieseng@users.sourceforge.net>
+
+ * OleDbDataAdapter.cs: Fixed custom attributes to match MS.NET.
+ * OleDbCommand.cs: Fixed custom attributes to match MS.NET.
+ * OleDbParameter.cs: Fixed custom attribute to match MS.NET.
+ * OleDbException.cs: Added ErrorTypeConverter, assigned to ErrorCode
+ property to match MS.NET.
+ * OleDbConnection.cs: Fixed custom attributes to match MS.NET.
+
2005-02-16 Lluis Sanchez Gual <lluis@novell.com>
* OleDbCommand.cs: Make it inherit from the correct base class in 2.0,
diff --git a/mcs/class/System.Data/System.Data.OleDb/OleDbCommand.cs b/mcs/class/System.Data/System.Data.OleDb/OleDbCommand.cs
index 6ea3570d70a..bed0b6aeb55 100644
--- a/mcs/class/System.Data/System.Data.OleDb/OleDbCommand.cs
+++ b/mcs/class/System.Data/System.Data.OleDb/OleDbCommand.cs
@@ -113,7 +113,7 @@ namespace System.Data.OleDb
[DataCategory ("Data")]
[DefaultValue ("")]
- [DataSysDescriptionAttribute ("Command text to execute")]
+ [DataSysDescriptionAttribute ("Command text to execute.")]
[EditorAttribute ("Microsoft.VSDesigner.Data.ADO.Design.OleDbCommandTextEditor, "+ Consts.AssemblyMicrosoft_VSDesigner, "System.Drawing.Design.UITypeEditor, "+ Consts.AssemblySystem_Drawing )]
[RefreshPropertiesAttribute (RefreshProperties.All)]
public string CommandText
@@ -126,7 +126,7 @@ namespace System.Data.OleDb
}
}
- [DataSysDescriptionAttribute ("Time to wait for command to execute")]
+ [DataSysDescriptionAttribute ("Time to wait for command to execute.")]
[DefaultValue (30)]
public int CommandTimeout {
get {
@@ -139,7 +139,7 @@ namespace System.Data.OleDb
[DataCategory ("Data")]
[DefaultValue ("Text")]
- [DataSysDescriptionAttribute ("How to interpret the CommandText")]
+ [DataSysDescriptionAttribute ("How to interpret the CommandText.")]
[RefreshPropertiesAttribute (RefreshProperties.All)]
public CommandType CommandType {
get {
@@ -151,7 +151,7 @@ namespace System.Data.OleDb
}
[DataCategory ("Behavior")]
- [DataSysDescriptionAttribute ("Connection used by the command")]
+ [DataSysDescriptionAttribute ("Connection used by the command.")]
[DefaultValue (null)]
[EditorAttribute ("Microsoft.VSDesigner.Data.Design.DbConnectionEditor, "+ Consts.AssemblyMicrosoft_VSDesigner, "System.Drawing.Design.UITypeEditor, "+ Consts.AssemblySystem_Drawing )]
public OleDbConnection Connection {
@@ -176,7 +176,7 @@ namespace System.Data.OleDb
}
[DataCategory ("Data")]
- [DataSysDescriptionAttribute ("The parameters collection")]
+ [DataSysDescriptionAttribute ("The parameters collection.")]
[DesignerSerializationVisibilityAttribute (DesignerSerializationVisibility.Content)]
public OleDbParameterCollection Parameters {
get {
@@ -185,7 +185,7 @@ namespace System.Data.OleDb
}
[BrowsableAttribute (false)]
- [DataSysDescriptionAttribute ("The transaction used by the command")]
+ [DataSysDescriptionAttribute ("The transaction used by the command.")]
[DesignerSerializationVisibilityAttribute (DesignerSerializationVisibility.Hidden)]
public OleDbTransaction Transaction {
get {
@@ -198,7 +198,7 @@ namespace System.Data.OleDb
[DataCategory ("Behavior")]
[DefaultValue (UpdateRowSource.Both)]
- [DataSysDescriptionAttribute ("When used by a DataAdapter.Update, how command results are applied to the current DataRow")]
+ [DataSysDescriptionAttribute ("When used by a DataAdapter.Update, how command results are applied to the current DataRow.")]
public UpdateRowSource UpdatedRowSource {
[MonoTODO]
get {
diff --git a/mcs/class/System.Data/System.Data.OleDb/OleDbConnection.cs b/mcs/class/System.Data/System.Data.OleDb/OleDbConnection.cs
index 005c0cfe594..c93b5e10a7e 100644
--- a/mcs/class/System.Data/System.Data.OleDb/OleDbConnection.cs
+++ b/mcs/class/System.Data/System.Data.OleDb/OleDbConnection.cs
@@ -71,7 +71,7 @@ namespace System.Data.OleDb
[DataCategory ("Data")]
[DefaultValue ("")]
- [DataSysDescriptionAttribute ("Information used to connect to a Data Source")]
+ [DataSysDescriptionAttribute ("Information used to connect to a Data Source.")]
[EditorAttribute ("Microsoft.VSDesigner.Data.ADO.Design.OleDbConnectionStringEditor, "+ Consts.AssemblyMicrosoft_VSDesigner, "System.Drawing.Design.UITypeEditor, "+ Consts.AssemblySystem_Drawing )]
[RecommendedAsConfigurableAttribute (true)]
[RefreshPropertiesAttribute (RefreshProperties.All)]
@@ -85,7 +85,7 @@ namespace System.Data.OleDb
}
[DesignerSerializationVisibilityAttribute (DesignerSerializationVisibility.Hidden)]
- [DataSysDescriptionAttribute ("Current connection timeout value 'Connect TimeOut=X' in the ConnectionString")]
+ [DataSysDescriptionAttribute ("Current connection timeout value, 'Connect Timeout=X' in the ConnectionString.")]
public int ConnectionTimeout {
get {
return connectionTimeout;
@@ -93,7 +93,7 @@ namespace System.Data.OleDb
}
[DesignerSerializationVisibilityAttribute (DesignerSerializationVisibility.Hidden)]
- [DataSysDescriptionAttribute ("Current data source Catlog value, 'Initial Catalog=X' in the ConnectionString")]
+ [DataSysDescriptionAttribute ("Current data source catalog value, 'Initial Catalog=X' in the connection string.")]
public string Database {
get {
if (gdaConnection != IntPtr.Zero
@@ -106,7 +106,7 @@ namespace System.Data.OleDb
}
[DesignerSerializationVisibilityAttribute (DesignerSerializationVisibility.Hidden)]
- [DataSysDescriptionAttribute ("Current data source, 'Data Source=X' in the ConnectionString")]
+ [DataSysDescriptionAttribute ("Current data source, 'Data Source=X' in the connection string.")]
public string DataSource {
get {
if (gdaConnection != IntPtr.Zero
@@ -119,7 +119,7 @@ namespace System.Data.OleDb
}
[DesignerSerializationVisibilityAttribute (DesignerSerializationVisibility.Hidden)]
- [DataSysDescriptionAttribute ("Current OLE DB provider progid, 'Provider=X' in the ConnectionString")]
+ [DataSysDescriptionAttribute ("Current OLE DB provider progid, 'Provider=X' in the connection string.")]
public string Provider {
get {
if (gdaConnection != IntPtr.Zero
@@ -132,7 +132,7 @@ namespace System.Data.OleDb
}
[DesignerSerializationVisibilityAttribute (DesignerSerializationVisibility.Hidden)]
- [DataSysDescriptionAttribute ("Version of the product accessed by the OLE DB Provider")]
+ [DataSysDescriptionAttribute ("Version of the product accessed by the OLE DB Provider.")]
[BrowsableAttribute (false)]
public string ServerVersion {
get {
@@ -146,7 +146,7 @@ namespace System.Data.OleDb
}
[DesignerSerializationVisibilityAttribute (DesignerSerializationVisibility.Hidden)]
- [DataSysDescriptionAttribute ("The ConnectionState indicating whether the connection is open or closed")]
+ [DataSysDescriptionAttribute ("The ConnectionState indicating whether the connection is open or closed.")]
[BrowsableAttribute (false)]
public ConnectionState State
{
@@ -315,11 +315,11 @@ namespace System.Data.OleDb
#region Events and Delegates
- [DataSysDescription ("DbConnection_InfoMessage")]
+ [DataSysDescription ("Event triggered when messages arrive from the DataSource.")]
[DataCategory ("DataCategory_InfoMessage")]
public event OleDbInfoMessageEventHandler InfoMessage;
- [DataSysDescription ("DbConnection_StateChange")]
+ [DataSysDescription ("Event triggered when the connection changes state.")]
[DataCategory ("DataCategory_StateChange")]
public event StateChangeEventHandler StateChange;
diff --git a/mcs/class/System.Data/System.Data.OleDb/OleDbDataAdapter.cs b/mcs/class/System.Data/System.Data.OleDb/OleDbDataAdapter.cs
index 919b11a7224..754452cfa1f 100644
--- a/mcs/class/System.Data/System.Data.OleDb/OleDbDataAdapter.cs
+++ b/mcs/class/System.Data/System.Data.OleDb/OleDbDataAdapter.cs
@@ -84,9 +84,9 @@ namespace System.Data.OleDb
#region Properties
- [DefaultValue ("")]
+ [DefaultValue (null)]
[DataCategory ("Update")]
- [DataSysDescriptionAttribute ("Used during Update for deleted rows in DataSet")]
+ [DataSysDescriptionAttribute ("Used during Update for deleted rows in DataSet.")]
[EditorAttribute ("Microsoft.VSDesigner.Data.Design.DBCommandEditor, "+ Consts.AssemblyMicrosoft_VSDesigner, "System.Drawing.Design.UITypeEditor, "+ Consts.AssemblySystem_Drawing )]
public OleDbCommand DeleteCommand {
get {
@@ -97,9 +97,9 @@ namespace System.Data.OleDb
}
}
- [DefaultValue ("")]
+ [DefaultValue (null)]
[DataCategory ("Update")]
- [DataSysDescriptionAttribute ("Used during Update for new rows in DataSet")]
+ [DataSysDescriptionAttribute ("Used during Update for new rows in DataSet.")]
[EditorAttribute ("Microsoft.VSDesigner.Data.Design.DBCommandEditor, "+ Consts.AssemblyMicrosoft_VSDesigner, "System.Drawing.Design.UITypeEditor, "+ Consts.AssemblySystem_Drawing )]
public OleDbCommand InsertCommand {
get {
@@ -110,9 +110,9 @@ namespace System.Data.OleDb
}
}
- [DefaultValue ("")]
+ [DefaultValue (null)]
[DataCategory ("Fill")]
- [DataSysDescriptionAttribute ("Used during Fill/FillSchema")]
+ [DataSysDescriptionAttribute ("Used during Fill/FillSchema.")]
[EditorAttribute ("Microsoft.VSDesigner.Data.Design.DBCommandEditor, "+ Consts.AssemblyMicrosoft_VSDesigner, "System.Drawing.Design.UITypeEditor, "+ Consts.AssemblySystem_Drawing )]
public OleDbCommand SelectCommand {
get {
@@ -123,9 +123,9 @@ namespace System.Data.OleDb
}
}
- [DefaultValue ("")]
+ [DefaultValue (null)]
[DataCategory ("Update")]
- [DataSysDescriptionAttribute ("Used during Update for modified rows in DataSet")]
+ [DataSysDescriptionAttribute ("Used during Update for modified rows in DataSet.")]
[EditorAttribute ("Microsoft.VSDesigner.Data.Design.DBCommandEditor, "+ Consts.AssemblyMicrosoft_VSDesigner, "System.Drawing.Design.UITypeEditor, "+ Consts.AssemblySystem_Drawing )]
public OleDbCommand UpdateCommand {
get {
@@ -251,11 +251,11 @@ namespace System.Data.OleDb
#region Events and Delegates
- [DataSysDescription ("DbDataAdapter_RowUpdated")]
+ [DataSysDescription ("Event triggered before every DataRow during Update.")]
[DataCategory ("DataCategory_Update")]
public event OleDbRowUpdatedEventHandler RowUpdated;
- [DataSysDescription ("DbDataAdapter_RowUpdating")]
+ [DataSysDescription ("Event triggered after every DataRow during Update.")]
[DataCategory ("DataCategory_Update")]
public event OleDbRowUpdatingEventHandler RowUpdating;
diff --git a/mcs/class/System.Data/System.Data.OleDb/OleDbException.cs b/mcs/class/System.Data/System.Data.OleDb/OleDbException.cs
index b1ba229bddc..9006d63a97f 100644
--- a/mcs/class/System.Data/System.Data.OleDb/OleDbException.cs
+++ b/mcs/class/System.Data/System.Data.OleDb/OleDbException.cs
@@ -35,6 +35,7 @@
using System.ComponentModel;
using System.Data;
using System.Data.Common;
+using System.Globalization;
using System.Runtime.InteropServices;
using System.Runtime.Serialization;
@@ -55,8 +56,7 @@ namespace System.Data.OleDb
#endregion // Constructors
#region Properties
- // FIXME : On .NET the string is System.Data.OleDb.OleDbException+ErrorConverter
- [TypeConverterAttribute (typeof (OleDbException))]
+ [TypeConverterAttribute (typeof (OleDbException.ErrorCodeConverter))]
public override int ErrorCode {
get {
GdaList glist;
@@ -72,7 +72,7 @@ namespace System.Data.OleDb
}
}
- [ DesignerSerializationVisibilityAttribute (DesignerSerializationVisibility.Content)]
+ [DesignerSerializationVisibilityAttribute (DesignerSerializationVisibility.Content)]
public OleDbErrorCollection Errors {
get {
GdaList glist;
@@ -149,5 +149,13 @@ namespace System.Data.OleDb
}
#endregion // Methods
+
+ internal sealed class ErrorCodeConverter : Int32Converter
+ {
+ [MonoTODO]
+ public override object ConvertTo (ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType) {
+ return base.ConvertTo (context, culture, value, destinationType);
+ }
+ }
}
}
diff --git a/mcs/class/System.Data/System.Data.OleDb/OleDbParameter.cs b/mcs/class/System.Data/System.Data.OleDb/OleDbParameter.cs
index 000f76dc078..360212695ab 100644
--- a/mcs/class/System.Data/System.Data.OleDb/OleDbParameter.cs
+++ b/mcs/class/System.Data/System.Data.OleDb/OleDbParameter.cs
@@ -119,7 +119,7 @@ namespace System.Data.OleDb
#region Properties
[BrowsableAttribute (false)]
- [DataSysDescriptionAttribute ("The parameter generic type")]
+ [DataSysDescriptionAttribute ("The parameter generic type.")]
[RefreshPropertiesAttribute (RefreshProperties.All)]
[DesignerSerializationVisibilityAttribute (DesignerSerializationVisibility.Hidden)]
[DataCategory ("DataCategory_Data")]
@@ -131,7 +131,8 @@ namespace System.Data.OleDb
}
}
- [DataSysDescriptionAttribute ("Input, output, or bidirectional parameter")] [DefaultValue (ParameterDirection.Input)]
+ [DataSysDescriptionAttribute ("Input, output, or bidirectional parameter.")]
+ [DefaultValue (ParameterDirection.Input)]
[DataCategory ("DataCategory_Data")]
public ParameterDirection Direction {
get { return direction; }
@@ -139,17 +140,17 @@ namespace System.Data.OleDb
}
[BrowsableAttribute (false)]
- [DataSysDescriptionAttribute ("A design-time property used for strongly typed code generation")]
+ [DataSysDescriptionAttribute ("a design-time property used for strongly typed code-generation.")]
[DesignOnlyAttribute (true)]
[EditorBrowsableAttribute (EditorBrowsableState.Advanced)]
[DefaultValue (false)]
public bool IsNullable {
- get { return isNullable; }
- set { isNullable = value; }
+ get { return isNullable; }
+ set { isNullable = value; }
}
[DefaultValue (OleDbType.VarWChar)]
- [DataSysDescriptionAttribute ("The parameter native type")]
+ [DataSysDescriptionAttribute ("The parameter native type.")]
[RefreshPropertiesAttribute (RefreshProperties.All)]
[DataCategory ("DataCategory_Data")]
public OleDbType OleDbType {
@@ -161,14 +162,14 @@ namespace System.Data.OleDb
}
[DefaultValue ("")]
- [DataSysDescriptionAttribute ("Name of the parameter")]
+ [DataSysDescriptionAttribute ("Name of the parameter.")]
public string ParameterName {
get { return name; }
set { name = value; }
}
[DefaultValue (0)]
- [DataSysDescriptionAttribute ("For decimal, numeric, varnumeric DBTypes")]
+ [DataSysDescriptionAttribute ("For decimal, numeric, varnumeric DBTypes.")]
[DataCategory ("DataCategory_Data")]
public byte Precision {
get { return precision; }
@@ -176,7 +177,7 @@ namespace System.Data.OleDb
}
[DefaultValue (0)]
- [DataSysDescriptionAttribute ("For decimal, numeric, varnumeric DBTypes")]
+ [DataSysDescriptionAttribute ("For decimal, numeric, varnumeric DBTypes.")]
[DataCategory ("DataCategory_Data")]
public byte Scale {
get { return scale; }
@@ -185,7 +186,7 @@ namespace System.Data.OleDb
[DefaultValue (0)]
- [DataSysDescriptionAttribute ("Size of variable length data types (string & arrays)")]
+ [DataSysDescriptionAttribute ("Size of variable length data types (string & arrays).")]
[DataCategory ("DataCategory_Data")]
public int Size {
get { return size; }
@@ -193,7 +194,7 @@ namespace System.Data.OleDb
}
[DefaultValue ("")]
- [DataSysDescriptionAttribute ("When used by a DataAdapter.Update, the source column name that is used to find the DataSetColumn name in the ColumnMappings. This is to copy a value between the parameter and a datarow")]
+ [DataSysDescriptionAttribute ("When used by a DataAdapter.Update, the source column name that is used to find the DataSetColumn name in the ColumnMappings. This is to copy a value between the parameter and a datarow.")]
[DataCategory ("DataCategory_Data")]
public string SourceColumn {
get { return sourceColumn; }
@@ -201,7 +202,7 @@ namespace System.Data.OleDb
}
[DefaultValue (DataRowVersion.Current)]
- [DataSysDescriptionAttribute ("When used by a DataAdapter.Update(UpdateCommand only), the version of the DataRow value that is used to update the data source")]
+ [DataSysDescriptionAttribute ("When used by a DataAdapter.Update (UpdateCommand only), the version of the DataRow value that is used to update the data source.")]
[DataCategory ("DataCategory_Data")]
public DataRowVersion SourceVersion {
get { return sourceVersion; }
@@ -209,7 +210,7 @@ namespace System.Data.OleDb
}
[DefaultValue (null)]
- [DataSysDescriptionAttribute ("value of the parameter")]
+ [DataSysDescriptionAttribute ("Value of the parameter.")]
[TypeConverter (typeof (StringConverter))]
[DataCategory ("DataCategory_Data")]
public object Value {