2005-03-08 Sureshkumar T <tsureshkumar@novell.com>
* DbParameterBase.cs: Implemented most of get set methods.
* DbConnectionBase.cs: Commented ConnectionOptions creation,
because it is not yet implemented.
* DbCommandBase.cs: Implemented ExecuteScalar method.
* DbParameterCollectionBase.cs: Implemented Add method.
* DbDataReaderBase.cs: removed internal constructor DbDataReader
(DbCommand).
In System.Data.SqlClient:
2005-03-08 Sureshkumar T <tsureshkumar@novell.com>
* SqlDataReader.cs: Call base constructor with CommandBehavior
parameter instead of passing DbCommand object. The internal base
class with DbCommand Parameter is removed.
svn path=/trunk/mcs/; revision=41552
+2005-03-08 Sureshkumar T <tsureshkumar@novell.com>
+
+ * DbParameterBase.cs: Implemented most of get set methods.
+ * DbConnectionBase.cs: Commented ConnectionOptions creation,
+ because it is not yet implemented.
+ * DbCommandBase.cs: Implemented ExecuteScalar method.
+ * DbParameterCollectionBase.cs: Implemented Add method.
+ * DbDataReaderBase.cs: removed internal constructor DbDataReader
+ (DbCommand).
+
2005-03-02 Sureshkumar T <tsureshkumar@novell.com>
* DbConnectionBase.cs: CreateDbCommand: assign connection to the
2005-03-02 Sureshkumar T <tsureshkumar@novell.com>
* DbConnectionBase.cs: CreateDbCommand: assign connection to the
return reader.RecordsAffected;
}
return reader.RecordsAffected;
}
public override object ExecuteScalar ()
{
public override object ExecuteScalar ()
{
- throw new NotImplementedException ();
+ object val = null;
+ DbDataReader reader=ExecuteReader();
+ try {
+ if (reader.Read ())
+ val=reader[0];
+ } finally {
+ reader.Close();
+ }
+ return val;
get { return connectionOptions; }
}
get { return connectionOptions; }
}
public override string ConnectionString {
get { return connectionString; }
set {
public override string ConnectionString {
get { return connectionString; }
set {
- connectionOptions = ConnectionFactory.CreateConnectionOptionsInternal (value);
+ //connectionOptions = ConnectionFactory.CreateConnectionOptionsInternal (value);
connectionString = value;
}
}
connectionString = value;
}
}
this.behavior = behavior;
}
this.behavior = behavior;
}
- internal DbDataReaderBase (DbCommand command)
- {
-
- }
-
#endregion // Constructors
#region Properties
#endregion // Constructors
#region Properties
// System.Data.ProviderBase.DbParameterBase
//
// Author:
// System.Data.ProviderBase.DbParameterBase
//
// Author:
+// Sureshkumar T (tsureshkumar@novell.com)
// Tim Coleman (tim@timcoleman.com)
//
// Copyright (C) Tim Coleman, 2003
//
// Tim Coleman (tim@timcoleman.com)
//
// Copyright (C) Tim Coleman, 2003
//
//
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
//
//
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
//
namespace System.Data.ProviderBase {
public abstract class DbParameterBase : DbParameter
{
namespace System.Data.ProviderBase {
public abstract class DbParameterBase : DbParameter
{
+
+ #region Fields
+ string _name;
+ ParameterDirection _direction = ParameterDirection.Input;
+ bool _isNullable = false;
+ int _size;
+ byte _precision;
+ byte _scale;
+ object _paramValue;
+ int _offset;
+ DataRowVersion _sourceVersion;
+ string _sourceColumn;
+
+ #endregion // Fields
+
#region Constructors
[MonoTODO]
#region Constructors
[MonoTODO]
get { throw new NotImplementedException (); }
}
get { throw new NotImplementedException (); }
}
- [MonoTODO]
- public override ParameterDirection Direction {
- get { throw new NotImplementedException (); }
- set { throw new NotImplementedException (); }
+ public override ParameterDirection Direction {
+ get { return _direction; }
+ set { _direction = value; }
public override bool IsNullable {
public override bool IsNullable {
- get { throw new NotImplementedException (); }
- set { throw new NotImplementedException (); }
+ get { return _isNullable; }
+ set { _isNullable = value; }
public override int Offset {
public override int Offset {
- get { throw new NotImplementedException (); }
- set { throw new NotImplementedException (); }
+ get { return _offset; }
+ set { _offset = value; }
public override string ParameterName {
public override string ParameterName {
- get { throw new NotImplementedException (); }
- set { throw new NotImplementedException (); }
+ get { return _name; }
+ set { _name = value; }
public override byte Precision {
public override byte Precision {
- get { throw new NotImplementedException (); }
- set { throw new NotImplementedException (); }
+ get { return _precision; }
+ set { _precision = value; }
+
public override byte Scale {
public override byte Scale {
- get { throw new NotImplementedException (); }
- set { throw new NotImplementedException (); }
+ get { return _scale; }
+ set { _scale = value; }
+
public override int Size {
public override int Size {
- get { throw new NotImplementedException (); }
- set { throw new NotImplementedException (); }
+ get { return _size; }
+ set { _size = value; }
public override string SourceColumn {
public override string SourceColumn {
- get { throw new NotImplementedException (); }
- set { throw new NotImplementedException (); }
+ get { return _sourceColumn; }
+ set { _sourceColumn = value; }
public override DataRowVersion SourceVersion {
public override DataRowVersion SourceVersion {
- get { throw new NotImplementedException (); }
- set { throw new NotImplementedException (); }
+ get { return _sourceVersion; }
+ set { _sourceVersion = value; }
public override object Value {
public override object Value {
- get { throw new NotImplementedException (); }
- set { throw new NotImplementedException (); }
+ get { return _paramValue; }
+ set { _paramValue = value; }
}
#endregion // Properties
}
#endregion // Properties
public override int Add (object value)
{
ValidateType (value);
public override int Add (object value)
{
ValidateType (value);
- throw new NotImplementedException ();
+ return list.Add (value);
}
public override void AddRange (Array values)
}
public override void AddRange (Array values)
+2005-03-08 Sureshkumar T <tsureshkumar@novell.com>
+
+ * SqlDataReader.cs: Call base constructor with CommandBehavior
+ parameter instead of passing DbCommand object. The internal base
+ class with DbCommand Parameter is removed.
+
2005-03-07 Sureshkumar T <tsureshkumar@novell.com>
* SqlCommand.cs : Set CommandBehavior on
2005-03-07 Sureshkumar T <tsureshkumar@novell.com>
* SqlCommand.cs : Set CommandBehavior on
internal SqlDataReader (SqlCommand command)
#if NET_2_0
internal SqlDataReader (SqlCommand command)
#if NET_2_0
- : base ((DbCommand) command)
+ : base (command.CommandBehavior)
#endif // NET_2_0
{
readResult = false;
#endif // NET_2_0
{
readResult = false;