Files
mono/mcs/class/System.Data/System.Data.Odbc/OdbcCommandBuilder.cs
T
Sureshkumar T b1ab44391f In .:
2005-03-10  Sureshkumar T  <[email protected]>

	* System.Data.dll.sources: Added
	System.Data.Odbc/OdbcConnectionFactory.cs. 
	System.Data.Odbc/OdbcFactory.cs.

In System.Data.Odbc:
2005-03-10  Sureshkumar T  <[email protected]>

	Migrated core classes to derive from ProviderBase instead of
	implementing IDb* interfaces. Most part of these files have been
	branched with #if NET_2_0/ONLY_1_1. Make sure any changes works
	with both the profiles.

	* OdbcFactory.cs: Concrete Factory for DbProviderFactory. Factory
	to generate Connection,Command,etc.

	* OdbcConnectionFactory.cs: Concrete factory for DbConnectionFactory.

	* OdbcTransaction.cs: migration and overrides.
	* OdbcCommandBuilder.cs: migration and overrides.
	* OdbcDataReader.cs: --do--. no command behavior member as it will
	be maintained in base provider class.
	* OdbcParameterCollection.cs: --do--. Now, local ArrayList is not
	maintained here, instead it is in base class. Most of the methods
	which operated on this list are not needed in NET_2_0.
	* OdbcConnection.cs: Migration. connectionString is maintained in
	DbConnectionBase class.
	* OdbcParameter.cs: Migration. Many of the local members like
	value,sourceColumn are maintained in DbParameterBase.
	* OdbcCommand.cs: Migration. commandText,timeout and
	commandTimeOut are maintained in DbCommandBase class.


svn path=/trunk/mcs/; revision=41643
2005-03-10 12:48:43 +00:00

216 lines
5.3 KiB
C#

//
// System.Data.Odbc.OdbcCommandBuilder
//
// Author:
// Umadevi S ([email protected])
//
// Copyright (C) Novell Inc, 2004
//
//
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System.ComponentModel;
using System.Data;
using System.Data.Common;
namespace System.Data.Odbc
{
/// <summary>
/// Provides a means of automatically generating single-table commands used to reconcile changes made to a DataSet with the associated database. This class cannot be inherited.
/// </summary>
#if ONLY_1_1
public sealed class OdbcCommandBuilder : Component
#else // NET_2_0 and higher
public sealed class OdbcCommandBuilder : DbCommandBuilder
#endif // ONLY_1_1
{
#region Fields
OdbcDataAdapter adapter;
string quotePrefix;
string quoteSuffix;
#endregion // Fields
#region Constructors
public OdbcCommandBuilder ()
{
adapter = null;
quotePrefix = String.Empty;
quoteSuffix = String.Empty;
}
public OdbcCommandBuilder (OdbcDataAdapter adapter)
: this ()
{
this.adapter = adapter;
}
#endregion // Constructors
#region Properties
[OdbcDescriptionAttribute ("The DataAdapter for which to automatically generate OdbcCommands")]
[DefaultValue (null)]
public
#if NET_2_0
new
#endif // NET_2_0
OdbcDataAdapter DataAdapter {
get {
return adapter;
}
set {
adapter = value;
}
}
[BrowsableAttribute (false)]
[OdbcDescriptionAttribute ("The prefix string wrapped around sql objects")]
[DesignerSerializationVisibilityAttribute (DesignerSerializationVisibility.Hidden)]
public
#if NET_2_0
override
#endif // NET_2_0
string QuotePrefix {
get {
return quotePrefix;
}
set {
quotePrefix = value;
}
}
[BrowsableAttribute (false)]
[OdbcDescriptionAttribute ("The suffix string wrapped around sql objects")]
[DesignerSerializationVisibilityAttribute (DesignerSerializationVisibility.Hidden)]
public
#if NET_2_0
override
#endif // NET_2_0
string QuoteSuffix {
get {
return quoteSuffix;
}
set {
quoteSuffix = value;
}
}
#endregion // Properties
#region Methods
public static void DeriveParameters (OdbcCommand command)
{
throw new NotImplementedException ();
}
[MonoTODO]
protected override void Dispose (bool disposing)
{
throw new NotImplementedException ();
}
[MonoTODO]
public
#if NET_2_0
new
#endif // NET_2_0
OdbcCommand GetDeleteCommand ()
{
throw new NotImplementedException ();
}
[MonoTODO]
public
#if NET_2_0
new
#endif // NET_2_0
OdbcCommand GetInsertCommand ()
{
throw new NotImplementedException ();
}
[MonoTODO]
public
#if NET_2_0
new
#endif // NET_2_0
OdbcCommand GetUpdateCommand ()
{
throw new NotImplementedException ();
}
[MonoTODO]
public
#if NET_2_0
override
#endif // NET_2_0
void RefreshSchema ()
{
throw new NotImplementedException ();
}
#if NET_2_0
[MonoTODO]
protected override void ApplyParameterInfo (IDbDataParameter dbParameter, DataRow row)
{
throw new NotImplementedException ();
}
[MonoTODO]
protected override string GetParameterName (int position)
{
throw new NotImplementedException ();
}
[MonoTODO]
protected override string GetParameterPlaceholder (int position)
{
throw new NotImplementedException ();
}
[MonoTODO]
protected override DbProviderFactory ProviderFactory
{
get {throw new NotImplementedException ();}
}
[MonoTODO]
protected override void SetRowUpdatingHandler (DbDataAdapter adapter)
{
throw new NotImplementedException ();
}
#endif // NET_2_0
#endregion // Methods
}
}