Commit Graph
117 Commits
Author SHA1 Message Date
Maxime Brugidou a02d0c2e9a [Bug 16186] SqlCommand.BeginExecuteInternal fix
If you use a stored procedure or a prepared statement, with
CommantType.StoredProcedure the ar variable is not set as the result of
onnection.Tds.BeginExecuteProcedure().
2013-11-15 13:14:08 +01:00
vvaradhan ceefad76f1 2010-10-01 Veerapuram Varadhan <[email protected]>
** Fixes #561667
	* SqlCommand.cs (Dispose): While Disposing, set connection's
	datareader to null so the connection can be reused with another datareader.
2010-10-04 15:27:52 +05:30
vvaradhan 5b5d0dc864 2010-07-28 Veerapuram Varadhan <[email protected]>
** Fixes #584833
	* SqlCommand.cs (DeriveParameters): Support procedure name
	nomenclature of the form <database>.<user>.<procname> .
2010-07-28 12:52:03 +05:30
Gert Driesen 1925fbede7 * SqlCommandTest.cs: Improved test for invalid statement to cover
CloseConnection behavior.
* SqlCommand.cs: Ensure connection is closed if CloseConnection
behavior is set, and reader could not be created.

svn path=/trunk/mcs/; revision=138854
2009-07-28 17:24:35 +00:00
Gert Driesen 55a3f19733 * SqlCommand.cs: Moved connection reset before the throw.
Improved exception message.

svn path=/trunk/mcs/; revision=122380
2009-01-03 22:59:29 +00:00
Veerapuram Varadhan 004f5ad90c Reset the connection on timeout exception before reusing it
svn path=/trunk/mcs/; revision=118727
2008-11-13 17:01:23 +00:00
Veerapuram Varadhan efb49f7684 Simplification of if-else part
svn path=/trunk/mcs/; revision=113639
2008-09-20 18:54:17 +00:00
Veerapuram Varadhan 866542814b Handle no brackets scenario
svn path=/trunk/mcs/; revision=113637
2008-09-20 18:08:20 +00:00
Veerapuram Varadhan ad382304b1 Escape/trim schema/procedure names before passing them as parameter
values in DeriveParameters.


svn path=/trunk/mcs/; revision=113327
2008-09-17 16:53:59 +00:00
Marek Safar 02e9af391d Warnings cleanup
svn path=/trunk/mcs/; revision=111855
2008-08-28 19:08:55 +00:00
Gert Driesen ce5f523da5 * SqlCommandTest.cs: Enabled test for bug #412569.
* SqlCommand.cs (ExecuteReader): When behavior includes SingleRow,
then only return a single result. Fixes bug #412569.

svn path=/trunk/mcs/; revision=109065
2008-07-28 19:01:02 +00:00
Gert Driesen e5b3cc5096 * SqlCommand.cs: Fixed order of arguments for ArgumentException in
CommandTimeout. 
* SqlConnection.cs (ChangePassword): Do not allow empty connection
string. Updated exception messages.
* SqlConnectionTest.cs: Enabled tests for ChangePassword argument
checks.

svn path=/trunk/mcs/; revision=109060
2008-07-28 18:37:07 +00:00
Gert Driesen f5f8d8daba * SqlCommand.cs: Fixed param name in ArgumentException for negative
CommandTimeout to match MS. On 2.0 profile, throw NRE in Prepare
when connection is NULL. In Prepare, return immediately after
connection check (2.0 only) for stored procedures, or when no
parameters are added. Added check to see if transaction is
associated with same connection as the command and updated
exception messages.
* SqlCommandTest.cs: Enabled CommandTimeout test. Enabled test for
Prepare with NULL connection. Enabled test for bug #412586.
* SqlCommandTest.cs: Enabled and improved tests for pending transaction
and transaction that is not associated with connection. Added tests for
Prepare.

svn path=/trunk/mcs/; revision=109058
2008-07-28 18:15:17 +00:00
Gert Driesen ebf1361ab6 * SqlCommand.cs: Added bool argument to ValidateCommand to specify
whether an async method is being executed. Minor changes to exception
messages to match MS.
* SqlCommandTest.cs: Enabled and improved tests for Execute* with closed
connection.
* SqlCommandTest.cs: Enabled and improved tests for Execute* with only a
transaction set.

svn path=/trunk/mcs/; revision=109043
2008-07-28 16:17:55 +00:00
Gert Driesen 3dfa81f709 * SqlCommand.cs: Avoid NRE in CloseDataReader when connection is NULL.
Fixes bug #412584. Removed unused moreResults eargument from
CloseDataReader. Removed behavior argument from Execute, and have it
use the behavior field instead. In ValidateCommand, throw
InvalidOperationException instead of NRE when Connection is NULL.
* SqlDataReader.cs: Sync with SqlCommand's CloseDataReader signature
change.
* SqlCommandTest.cs: Enabled test for bug #412584.

svn path=/trunk/mcs/; revision=109033
2008-07-28 15:44:30 +00:00
Gert Driesen b1e8819b84 * SqlCommand.cs: (Transaction): On the 1.0 profile, do not allow
Transaction to be set when a reader is open for the current connection.
Fixes bug #412579.
* SqlCommandTest.cs: Enabled test for bug #412579.

svn path=/trunk/mcs/; revision=109021
2008-07-28 15:15:54 +00:00
Gert Driesen 8185146fb8 * SqlCommand.cs (Connection): Do not throw InvalidOperationException
if transaction is in progress. Fixes bug #412576. On 1.0 profile, throw
InvalidOperationException when a reader is open for the current
connection. Do not set transaction to NULL when changing connection,
instead set it to null in Transaction when transaction is no longer
open.
* SqlCommandTest.cs: Enabled and improved test for bug #412576.
Enabled test for changing Connection while reader is open.

svn path=/trunk/mcs/; revision=109018
2008-07-28 15:07:45 +00:00
Veerapuram Varadhan 57e4a0605f Fixes #326182
svn path=/trunk/mcs/; revision=107667
2008-07-10 16:46:48 +00:00
Marek Habersack 5d0f03654d 2008-06-12 Marek Habersack <[email protected]>
* SqlParameterCollection.cs: this [int] must check the range and
	throw an exception if necessary.
	
	* SqlCommand.cs: throw IOEX when stored procedure is not found in
	DeriveParameters. All procedures in MS SQL will report at least
	one parameter - the return value.

svn path=/trunk/mcs/; revision=105657
2008-06-11 22:23:39 +00:00
Marek Habersack d1ee1bfd9c 2008-06-09 Ankit Jain <[email protected]>
* Mono.Data.SybaseClient/SybaseCommand.cs: Use Tds instead of ITds now.
        * Mono.Data.SybaseClient/SybaseConnection.cs: Likewise.

2008-06-09  Ankit Jain  <[email protected]>

        * ITds.cs: Removed.
        * Mono.Data.Tds.dll.sources: Update.

2008-06-09  Ankit Jain  <[email protected]>

        * TdsCommand.cs, TdsConnection.cs: Use Tds instead of ITds now.

2008-06-09  Ankit Jain  <[email protected]>

        * SqlCommand.cs: Use Tds instead of ITds now.
        * SqlConnection.cs:  Likewise.


svn path=/trunk/mcs/; revision=105402
2008-06-10 10:22:11 +00:00
Veerapuram Varadhan 4f724ba9eb ** Fixes Bug#381151
* SqlCommand.cs: Handle exceptions sanely and do not close
        connection on TdsTimeoutException.


svn path=/trunk/mcs/; revision=101411
2008-04-22 11:09:32 +00:00
Gert Driesen 3aeddf81e9 * SqlBulkCopyColumnMappingCollection.cs: Changed argument names to
match MS. Code formatting.
* SqlCommand.cs: Changed argument names to match MS. Code formatting.
Do not include explicit IDbCommand implementation on 2.0 profile.
* SqlCommandBuilder.cs: Changed argument names to match MS. Code
formatting.
* SqlDataReader.cs: Changed argument names to match MS. Code
formatting.
* SqlParameterCollection.cs: Do not include IList, ICollection and
IDataParameterCollection explicit interface implementation on 2.0
profile. Code formatting.
* SqlConnection.cs: Changed argument names to match MS.
* SqlDataAdapter.cs: Changed argument names to match MS.
* SqlTransaction.cs: Do not include explicit interface implementation
of IDbTransaction.Connection on 2.0 profile. Code formatting.

svn path=/trunk/mcs/; revision=101355
2008-04-21 18:59:17 +00:00
Marek Habersack f69bd85724 2008-04-01 Marek Habersack <[email protected]>
* SqlParameter.cs: ConvertToFrameworkType must handle empty
	strings gracefully - a DBNull.Value must be returned in this
	case.

	* SqlCommand.cs: DeriveParameters should split the stored
	procedure name into the schema name and procedure name before
	querying its parameters.

svn path=/trunk/mcs/; revision=99553
2008-04-01 17:33:08 +00:00
Gert Driesen c231373769 * DataColumn.cs: Fixed ParamName of ArgumentNullException. Modified
exception message for invalid DateTimeMode value to match MS. Code
formatting.
* DbDataPermissionAttribute.cs: In KeyRestrictionBehavior, reuse
ExceptionHelper.CheckEnumValue.   
* ExceptionHelper.cs: Use same exception message for both 1.0 and 2.0.
* Index.cs: Fixed compiler warnings. Code formatting.
* SqlCommand.cs: Use ExceptionHelper.CheckEnumValue for enum checks.
* OleDbCommand.cs: Use ExceptionHelper.CheckEnumValue for enum checks.
* DBDataPermissionAttributeTest.cs: Improved test for invalid
KeyRestrictionBehavior. Fixed line endings.
* DataColumnTest.cs: No longer derive from deprecated Assertion class.
Code formatting. Added test for DateTimeMode.

svn path=/trunk/mcs/; revision=87866
2007-10-21 13:26:43 +00:00
Gert Driesen 3930b4b9cf * System.Data_test.dll.sources: Added DbDataAdapterTest.cs,
OdbcCommandTest.cs, OdbcConnectionTest.cs, OdbcDataAdapterTest.cs, 
OleDbCommandTest.cs, OleDbConnectionTest.cs, OleDbDataAdapterTest.cs, 
SqlDataAdapterTest.cs.
* DbDataAdapter.cs: Implemented UpdateBatchSize setter.
* DataAdapter.cs: In FillLoadOption setter, ensure value is valid.
Modified MissingMappingAction and MissingSchemaAction setters to use
ExceptionHelper.CheckEnumValue to validate value. Spaces to tabs and
code formatting.
* ExceptionHelper.cs: Added CheckEnumValue method and modified
InvalidEnumValueException method to return AORE on 2.0 profile. Added
ConnectionClosed method that returns an InvalidOperationException.
* OleDbDataAdapter.cs: In default ctor, set SelectCommand to null.
Only initialize SelectCommand in ctors. Use direct assignment in
IDbDataAdapter implementation.
* OleDbCommand.cs: Added constant for default CommandTimeout, instead
of using a magic number. Avoid unnecessary initialization. Fixed
default value for DesignTimeVisible. Return zero-length string if
CommandText is null. Added implementation for UpdatedRowSource.
* OleDbConnection.cs: Moved initialization of gda to Open ().
Avoid unnecessary initialization. Return zero-length string if
ConnectionString is null. If getters to Database, DataSource and
Provider return zero-length string if the connection is closed.
In ServerVersion, BeginTransaction and GetSchema, throw an
InvalidOperationException if connection is closed.
* OdbcCommand.cs: Added constant for default CommandTimeout, instead
of using a magic number. Avoid unnecessary initialization. Fixed
default value for DesignTimeVisible. Return zero-length string if
CommandText is null. Spaces to tabs and code formatting.
* OdbcError.cs: Fixed typo in exception message.
* OdbcConnection.cs: Return zero-length string if ConnectionString is
null. In getters for Database, DataSource and Driver return a
zero-length string if connection is closed. In BeginTransaction and
GetSchema throw InvalidOperationException if connection is closed.
Added override for GetSchema (string, string []). Use string.Empty
instead of "".
* OdbcDataAdapter.cs: Avoid unnecessary initializations. Use direct
assignment in IDbDataAdapter implementation. In default ctor, set
SelectCommand to null.
* SqlCommand.cs: Added constant for default CommandTimeout, instead
of using a magic number. Avoid unnecessary initialization. Fixed
default value for DesignTimeVisible. Return zero-length string if
CommandText is null. Use ExceptionHelper.InvalidEnumValueException
to avoid code duplication. Spaces to tabs and code formatting.
* SqlConnection.cs: Use different default package size on 2.0 profile.
Added constants for default values, instead of using magic numbers.
Avoid unnecessary initialization. In PacketSize, return default or
configured packet size when connection is not open. Use 
ExceptionHelper.ConnectionClosed instead of local method. Removed   
use of some hardcoded values in SetDefaultConnectionParameters, and
use Environment.MachineName as default WorkstationId instead of 
DNS host name. Code formatting.
* SqlDataAdapter.cs: In default ctor, set SelectCommand to null.
Avoid unnecessary initializations. Use direct assignment in   
IDbDataAdapter implementation. Fixed exception message for negative
UpdateBatchSize. In Dispose override, make sure to invoke base
method.
* DbDataAdapterTest.cs: Added test for UpdateBatchSize.
* DataAdapterTest.cs: Added tests for AcceptChangesDuringFile,   
AcceptChangesDuringUpdate, ContinueUpdateOnError, FillLoadOption,
MissingMappingAction, MissingSchemaAction and                      
ReturnProviderSpecificTypes.
* OdbcDataAdapterTest.cs: Added tests for ctors, DeleteCommand,
InsertCommand, SelectCommand, UpdateCommand and Dispose.
* OdbcDataReaderTest.cs: fixed line endings.
* OdbcCommandTest.cs: Added tests for ctors and CommantText.
* OdbcConnectionTest.cs: Removed original test that relied on MySQL.
Added ctor tests. Added tests for BeginTransaction, GetSchema and 
ServerVersion with connection that is closed.
* OleDbDataAdapterTest.cs: Added tests for ctors, DeleteCommand, 
InsertCommand, SelectCommand, UpdateCommand and Dispose.
* OleDbCommandTest.cs: Added tests for ctors and CommandText.
* OleDbConnectionTest.cs: Added tests for ctors and ConnectionString. 
Added tests for BeginTransaction, GetSchema and ServerVersion with connection that is closed.
* SqlCommandTest.cs: Added tests for ctors and CommantText. 
* SqlConnectionTest.cs: Added tests for ctors, ConnectionString and 
ServerVersion.
* SqlDataAdapterTest.cs: Added tests for ctors, DeleteCommand,
InsertCommand, SelectCommand, UpdateCommand, UpdateBatchSize and 
Dispose.

svn path=/trunk/mcs/; revision=87859
2007-10-20 23:16:52 +00:00
Nagappan Alagappan 66cf8bc111 2007-09-25 Nagappan A <[email protected]>
* SqlInitialCatalogConverter.cs, SqlDataSourceConverter.cs:
	NetworkLibraryConverter.cs: Added new files.

	* SqlParameter.cs: 2.0 attribute changes.

	* SqlDataAdapter.cs: 2.0 attribute changes.

	* SqlConnectionStringBuilder.cs: 2.0 attribute changes.

	* SqlConnection.cs (ClearAllPools, ClearPool): Implemented 2.0
	APIs, other 2.0 attribute changes.

	* SqlCommandBuilder.cs (GetSchemaTable, InitializeCommand):
	Implemented 2.0 APIs, other 2.0 attribute changes.

	* SqlBulkCopyColumnMappingCollection.cs: Added constructor, 2.0
	API compatibility changes.

	* SqlException.cs: 2.0 attribute changes.


svn path=/trunk/mcs/; revision=86297
2007-09-25 06:37:24 +00:00
Nagappan Alagappan 8195433dd7 2007-08-06 Nagappan A <[email protected]>
* SqlCommand.cs, SqlDataReader.cs, SqlConnection.cs: When the
	server resets the connection, now the client code also disconnects
	the session and remove the instance from pool. Fixes bug # 81933.


svn path=/trunk/mcs/; revision=83522
2007-08-06 07:17:20 +00:00
Nagappan Alagappan fde6582ce8 2007-07-31 Nagappan A <[email protected]>
* SqlCommand.cs (Transaction, Connection): IDbCommand Transaction
	and Connection can be set to null. Fixes bug 82189.


svn path=/trunk/mcs/; revision=83059
2007-07-31 09:05:19 +00:00
Nagappan Alagappan 958cc8d1e3 2007-07-22 Nagappan A <[email protected]>
* SqlBulkCopy.cs (NotifyAfter): Implemented 2.0 property.
	(GetColumnMetaData, GenerateColumnMetaData):
	(ValidateColumnMapping): Implemented private method's to generate
	and validate SqlBulkCopy headers.
	(BulkCopyToServer): Private method to actually do the bulk copy
	processing.
	(WriteToServer): Implemented 2.0 missing overloaded methods.
	(IDisposable.Dispose): Implemented 2.0 missing method.

	* SqlBulkCopyColumnMappingCollection.cs (Add, CopyTo): Implemented
	missing API.
	(Item): Implemented missing property.

	* SqlBulkCopyColumnMapping.cs: Modified the implementation of
	Constructors to use property.

	* SqlDataReader.cs (GetSqlXml, IsCommandBehaviour): Added 2.0
	missing method.
	(Connection): Added missing property.

	* SqlParameter.cs (SetSqlDbType, ConvertToFrameworkType): Modified
	method as internal from private.

	* SqlConnection.cs: Fixed 2.0 missing feature.

	* SqlException.cs: Fixed 2.0 missing feature.

	* SqlClientPermission.cs: Fixed 2.0 missing feature.


svn path=/trunk/mcs/; revision=82428
2007-07-22 07:09:26 +00:00
Gert Driesen 61bba85f06 * ISqlNotificationReceiver.cs: Removed.
* SqlClientFactory.cs: Use SqlDataSourceEnumerator from S.D.Sql and
marked method todo. Avoid unnessary casts. Code formatting.
* SqlCommand.cs: Explicit interface implementation of IDbCommand not
necessary on 2.0 profile. Fixes API mismatches. Avoid unnecessary
casts. Code formatting.
* SqlConnection.cs: Also use RecommendAsConfigurable instead of
SettingBindableAttribute on 2.0. Use StateChange event from base class
on 2.0. Only explicitly implement IDbConnection methods on 1.0, since
these are implemented by base class on 2.0 profile. Removed extra
explicit implementation of IDisposable since the base class implements
this. Code formatting.
* SqlDataAdapter.cs: Dispose (bool) override not necessary on 2.0
profile. Stubbed ICloneable.Clone. Fixes API mismatches.
* SqlDataReader.cs: On 2.0, IDisposable.Dispose is implemented by
DbDataReader. Only 1.0 profile, explicitly implemented IEnumerable
GetEnumerator. Code formatting.
* SqlDataSourceEnumerator.cs: Removed.
* SQLDebugging.cs: Marked sealed on 2.0. Code formatting.
* SqlNotificationAuthType.cs: Removed.
* SqlNotificationInfo.cs: Added missing fields. Code formatting.
* SqlNotificationSource.cs: Added missing fields. Code formatting.
* SqlNotificationTransports.cs: Removed.
* SqlNotificationType.cs: Added missing Unknown field. Code formatting.
* SqlParameter.cs: Removed Browsable and EditorBrowsable attributes
from Precision and Scale. Fixes API mismatches. Code formatting fixes.
* SqlTransaction.cs: On 2.0 profile, Dispose method is exposed by
base class. Fixes API mismatches. Code formatting fixes.
* System.Data.dll.sources: Removed ISqlNotificationReceiver.cs,
SqlDataSourceEnumerator.cs, SqlNotificationAuthType.cs,
SqlNotificationTransports.cs.

svn path=/trunk/mcs/; revision=81134
2007-07-01 08:46:06 +00:00
Nagappan Alagappan d6af08e613 2007-06-11 Nagappan A <[email protected]>
* SqlCommand.cs (Dispose): On disposing the command object, don't
	dispose connection and transaction.


svn path=/trunk/mcs/; revision=79148
2007-06-11 06:01:44 +00:00
Nagappan Alagappan 240d238b80 2007-06-06 Nagappan A <[email protected]>
* SqlCommand.cs, SqlConnectionStringBuilder.cs, SqlConnection.cs:
	Fixed 1.0 and 2.0 extras, errors as stated in class status page.

	* SqlDataAdapter.cs, SqlParameter.cs:Fixed 1.0 and 2.0 extras,
	errors as stated in class status page.

	* SqlBulkCopyColumnMappingCollection.cs: Fixed 1.0 and 2.0 extras,
	errors as stated in class status page.


svn path=/trunk/mcs/; revision=78717
2007-06-06 10:39:33 +00:00
Nagappan Alagappan 0fd75cc776 2007-05-30 Nagappan A <[email protected]>
* SqlParameter.cs (SqlParameter): Updated constructor to use the
	new TDS RPC implementation.
	Fixed missing attributes.
	(SetDbType): Added new case for sql_variant type.
	(ConvertToFrameworkType): Implemented new private method to
	convert the data type to framework type.

	* SqlParameterCollection.cs: Fixed missing attributes and
	implemented missing methods.

	* SqlConnection.cs: Fixed missing attributes.

	* SqlConnectionStringBuilder.cs: Certain attributes are missing or
	its value or they are not appropriate. Fixed them.

	* SqlDataReader.cs (GetData): Method is available only under 1.0
	profile.
	
	* SqlCommandBuilder.cs: Certain attributes are available only
	under 2.0 profile, so moved them inside ifdef.

	* SqlCommand.cs: Certain attributes are available only under 2.0
	profile, so moved them inside ifdef.


svn path=/trunk/mcs/; revision=78186
2007-05-30 10:52:37 +00:00
Nagappan Alagappan 77aea76d2f 2007-05-29 Nagappan A <[email protected]>
* SqlCommand.cs (Dispose): Command.Dispose closing
	connection. Fixes bug # 81710. Thanks to AMC <[email protected]>
	for the fix.


svn path=/trunk/mcs/; revision=78101
2007-05-29 08:47:34 +00:00
Nagappan Alagappan c317c256c1 2007-03-20 Nidhi Rawal <[email protected]>
* SqlClientFactory.cs: Added two using directives.
	(CreateConnectionStringBuilder): Implemented the method.
	(CreatePermission): Implemented the property.
	
	* SqlCommand.cs: Added one using directive.
	(Clone): Implemented the method.
	(Dispose): Implemented the method.
	(BeginExecuteXmlReader): Implemented the method.
	
	* SqlCommandBuilder.cs (QuoteIdentifier): Implemented the method.
	(UnquoteIdentifier): Implemented the method.
	
	* SqlConnection.cs (ChangePassword): Implemented the method.

2007-03-19  Nidhi Rawal  <[email protected]>

	* SqlClientFactory.cs (CanCreateDataSourceEnumerator): Implemented
	the property.

	* SqlCommand.cs (Notification): Implemented the property.
	(NotificationAutoEnlist): Implemented the property.

	* SqlDataReader.cs (VisibleFieldCount): Implemented the property.

	* SqlConnectionStringBuilder.cs (TrustServerCertificate): Implemented
	the property.
	(TypeSystemVersion): Implemented the property.
	(UserInstance): Implemented the property.
	(ContextConnection): Implemented the property.

	* SqlConnection.cs (FireInfoMessageEventOnUserErrors): Implemented
	the property.
	(StatisticsEnabled): Implemented the property.
	
	* SqlDataAdapter.cs (UpdateBatchSize): Implemented the property.

	* SqlParameter.cs: Implemented one attribute.


svn path=/trunk/mcs/; revision=75189
2007-03-30 12:43:28 +00:00
Andreia Gaita f733e8b5b5 2007-03-16 Andreia Gaita <[email protected]>
* SqlParameter.cs: Move isVariableSizeType flag to TdsMetaParameter
so that the TdsMetaParameter can validate itself for valid size / values.
* SqlCommand.cs (Execute): Call Validate on TdsMetaParameter.

* TdsMetaParameter.cs: Add Validate() method. For now, validate 
size/value. Add isVariableSizeType.

* SqlCommandTest.cs: Add OutputParamSizeTest1-4 to test size/value
validation exception.

svn path=/trunk/mcs/; revision=74500
2007-03-16 21:24:35 +00:00
Nagappan Alagappan 6b6e0e53b0 2007-03-14 Nagappan A <[email protected]>
* SqlCommand.cs (CommandType): Exception type thrown in 2.0
	profile is different than 1.0, ArgumentOutOfRangeException.
	(Connection): Exception type thrown in 2.0 profile is different
	than 1.0, ArgumentOutOfRangeException.
	(Execute): If Size property is 0 for String and Binary type, then
	throw InvalidOperationException.
	(ValidateCommand): Exception type thrown in 2.0 profile is
	different than 1.0, NullReferenceException.


svn path=/trunk/mcs/; revision=74232
2007-03-14 05:57:41 +00:00
Andreia Gaita 31401d33cb 2007-03-09 Andreia Gaita <[email protected]>
* SqlCommand.cs (ExecuteScalar): Fix returned value for 
stored procedure calls to return the first column of the
first row produced by the proc.

* SqlCommandTest.cs: Add parameterized stored procedure call tests
to ExecuteScalar and ExecuteNonQuery.

svn path=/trunk/mcs/; revision=73982
2007-03-09 02:19:43 +00:00
Nagappan Alagappan ea691485ba 2007-03-08 Nagappan A <[email protected]>
* SqlCommand.cs (CloseDataReader): Checks whether the SQL
	connection is created or not.


svn path=/trunk/mcs/; revision=73941
2007-03-08 13:27:32 +00:00
Andreia Gaita 645ef8bd89 * SqlCommand.cs (ExecuteScalar): when calling stored procedures,
implement support for return of output values in the parameter
collection.

2007-03-07  Andreia Gaita <[email protected]>

svn path=/trunk/mcs/; revision=73914
2007-03-07 22:06:29 +00:00
Nagappan Alagappan 80f1f8ad35 2007-02-16 Nidhi Rawal <[email protected]>
* SqlParameter.cs (CompareInfo): Implemented the property
	CompareInfo.

2007-02-15  Nidhi Rawal  <[email protected]>

	* SqlCommand.cs: Added some attributes which were not implemented
	for .NET 2.0 and removed extra attribute which are not there in
	.NET 2.0.

	* SqlCommandBuilder.cs: Added some attributes that were not 
	implemented for .NET 2.0.

	* SqlParameterCollection.cs: Added some attributes that were 
	not implemented for .NET 2.0.

	* SqlConnectionStringBuilder.cs: Added some attributes that
	 were not implemented for .NET 2.0.
	
	* SqlConnection.cs: Added attribute that was not implemented
	for .NET 2.0.

	* SqlParameter.cs: Added some attributes which were not
	implemented for .NET 2.0 and removed some extra attributes which
	are not there in .NET 2.0


svn path=/trunk/mcs/; revision=73144
2007-02-20 06:16:02 +00:00
Nagappan Alagappan 16ade3ad4f 2007-02-09 Nagappan A <[email protected]>
* SqlConnection.cs (SetConnectionString): Fixes bug # 80712. A
	small typo.


svn path=/trunk/mcs/; revision=72537
2007-02-09 13:49:49 +00:00
Nagappan Alagappan f0d2e2860d 2007-01-08 Nagappan A <[email protected]>
* SqlTransaction.cs (Dispose): Fixed compliation warning.

	* SqlDataReader.cs (GetValues): Length of elements to be copied was
	decided based on the argument array passed, which caused a bug, if
	the length of given array is more than actual column values.

	* SqlCommandBuilder.cs (CatalogSeparator, SchemaSeparator)
	(CatalogLocation): Implemented missing properties.
	(CreateDeleteCommand, CreateInsertCommand, CreateUpdateCommand):
	Modified private methods to take bool flag. If true, add actual
	parameter name instead of p1, p2 etc.
	(CreateParameter): Added overloaded private method to create
	parameter with the actual column name.
	(GetUpdateCommand, GetDeleteCommand, GetInsertCommand):
	Implemented missing overloaded methods.
	(SetRowUpdatingHandler): Implemented missing protected method.

	* SqlCommand.cs: Fixed compilation warning. Removed bogus
	MonoTODO's.


svn path=/trunk/mcs/; revision=70619
2007-01-08 05:54:50 +00:00
Nagappan Alagappan eb9cad4ca0 2006-12-05 Nagappan A <[email protected]>
* SqlCommand.cs (Execute): If sql2 length is greater than 0, then
	add ';' and the respective sql2 string and then execute the
	string. Fixes bug # 79880.


svn path=/trunk/mcs/; revision=69019
2006-12-05 10:03:01 +00:00
Senganal T dbcfcb27fe 2006-07-13 Senganal T <[email protected]>
* Test/System.Data.Common/DBDataPermissionTest.cs : Removed invalid tests

	* System.Data.Common/SchemaInfo.cs DbDataAdapter.cs DbConnectionOptions.cs DbParameter.cs 
	DbMetaDataColumnNames.cs DbTransaction.cs DataTableMapping.cs DataAdapter.cs 
	FieldNameLookup.cs DbDataRecord.cs DataColumnMappingCollection.cs DbCommand.cs 
	DbDataPermission.cs DbProviderFactory.cs DbCommandBuilder.cs DbConnectionString.cs 
	RowUpdatedEventArgs.cs DbDataReader.cs DbConnectionStringBuilder.cs DbConnection.cs 
	DataTableMappingCollection.cs :
		2.0 Api fixes

	* System.Data.SqlClient/SqlClientFactory.cs SqlCommand.cs SqlConnectionFactory.cs 
	SqlClientPermission.cs SqlParameterCollection.cs SqlDataReader.cs 
	SqlConnection.cs SqlParameter.cs SqlTransaction.cs :
		2.0 Api fixes

	* System.Data.Odbc/OdbcTransaction.cs OdbcCommand.cs OdbcConnectionFactory.cs 
	OdbcPermission.cs OdbcDataReader.cs OdbcParameterCollection.cs 
	OdbcConnection.cs OdbcFactory.cs OdbcParameter.cs :
		2.0 Api fixes

	* System.Data.OleDb/OleDbCommand : 2.0 Api fixes

	* System.Data.dll.sources: 
		- Added to build :
			System.Data.Common/DbMetaDataColumnNames.cs
		- Removed from build :
			System.Data.Common/DbCommandOptionalFeatures.cs
			System.Data.Common/DbCommandSet.cs
			System.Data.Common/DbProviderSupportedClasses.cs
			System.Data.Common/SchemaLocation.cs
			System.Data.Odbc/OdbcConnectionFactory.cs
			System.Data.SqlClient/SqlConnectionFactory.cs
			System.Data.ProviderBase/DbCommandBase.cs
			System.Data.ProviderBase/DbConnectionBase.cs
			System.Data.ProviderBase/DbConnectionFactory.cs
			System.Data.ProviderBase/DbConnectionInternal.cs
			System.Data.ProviderBase/DbConnectionPoolCounters.cs
			System.Data.ProviderBase/DbConnectionPoolOptions.cs
			System.Data.ProviderBase/DbDataReaderBase.cs
			System.Data.ProviderBase/DbMetaDataFactory.cs
			System.Data.ProviderBase/DbParameterBase.cs
			System.Data.ProviderBase/DbParameterCollectionBase.cs
			System.Data.ProviderBase/DbReferenceCollection.cs

	* Makefile : Add System.Transactions library reference to net_2_0 PROFILE


svn path=/trunk/mcs/; revision=62561
2006-07-13 14:19:17 +00:00
Chris Toshok c21950a927 In System.Data.OleDb:
* OleDbDataAdapter.cs, OleDbCommand.cs, OleDbParameter.cs,
	OleDbCommandBuilder.cs, OleDbConnection.cs: remove
	DataSysDescriptions for >= 2.0.

2006-02-17  Chris Toshok  <[email protected]>

In System.Data.SqlClient:
	* SqlCommand.cs, SqlCommandBuilder.cs, SqlConnection.cs,
	SqlDataAdapter.cs: remove DataSysDescription attributes for >= 2.0

2006-02-17  Chris Toshok  <[email protected]>

In System.Data:
	* System.Data/DataSet.cs, System.Data/DataView.cs,
	System.Data/ForeignKeyConstraint.cs,
	System.Data/DataViewManager.cs, System.Data/DataRow.cs,
	System.Data/DataSysDescriptionAttribute.cs,
	System.Data/UniqueConstraint.cs, System.Data/DataTable.cs,
	System.Data/DataRelation.cs: lots of attribute work, removing
	DataSysDescription atributes (and marking the class obsolete) for
	2.0.

2006-02-17  Chris Toshok  <[email protected]>


svn path=/trunk/mcs/; revision=57018
2006-02-17 20:34:22 +00:00
Senganal T 1ed319dc99 2006-02-10 Senganal T <[email protected]>
* Mono.Data.Tds/Mono.Data.Tds.Protocol/Tds.cs :
		- GetSequentialColumn,BeginLoad, EndLoad,
		LoadData, SkipRow, SkipToColumnIndex
		New Methods to Support sequential loading of row data
	* Mono.Data.Tds/Mono.Data.Tds.Protocol/TdsComm.cs :
		- Skip : Changed arugment type from int to long.
	* System.Data/Test/ProviderTests/System.Data.SqlClient/SqlDataReaderTest.cs : 
		Added more tests to verify Sequential reading of row data.
	* System.Data/Test/ProviderTests/ProviderIndependant/DataReaderTest : Corrected a failing testcase.
	* System.Data/System.Data.SqlClient/SqlDataReader.cs :
		- GetBytes : Read binary/blob/clob data sequentially when
		CommandBehavior is set to SequentialAcccess
		- GetChars : Read String/clob data sequentially when CommandBehavior
		is set to SequentialAccess
	* System.Data/System.Data.SqlClient/SqlCommand.cs :
		- ExecuteReader : set SequentialAccess property on TDS
		- CloseDataReader : Reset the command behavior


svn path=/trunk/mcs/; revision=56757
2006-02-10 14:50:55 +00:00
Senganal T 9c65e65c45 2006-01-27 Senganal T <[email protected]>
* Mono.Data.Tds/Mono.Data.Tds.Protocol/Tds.cs :
		- Modified GetSqlMoney () , to set the precision and Scale correctly.
		- Modified ProcessColumnDetails , to set the schema values correctly.
	* Mono.Data.Tds/Mono.Data.Tds.Protocol/TdsDataColumn.cs : Added some default values for the column schema
	* System.Data/Test/ProviderTests/ProviderIndependant/DataReaderTest : Corrected a failing testcase.
	* System.Data/Test/ProviderTests/System.Data.SqlClient/SqlCommandBuilderTest.cs : corrected a failing testcase
	* System.Data/System.Data.SqlTypes/SqlDateTime : Corrected the MaxValue for SqlDateTime
	* System.Data/System.Data.Common/DbDataAdapter.cs :
		- Modified schema population to follow MissingSchemaAction and MissingMappingAction
		- Add a column to the Primary Key only if its not a hidden key
		- Added some argument checks
		- Removed some redundant code
	* System.Data/System.Data.Common/DataAdapter :
		- Added argument checks
	* System.Data/System.Data.Common/ExceptionHelper :
		- Added InvalidEnumException , a helper function to print error msg
	* System.Data/System.Data.SqlClient/SqlCommandBuilder.cs :
		- Modified  CreateUpdateCommand,CreateDeleteCommand , to not include
		column name in the query if its a expression col.
		Also, modified the queries to match the generated queries in ms.net
	* System.Data/System.Data.SqlClient/SqlCommand.cs :
		- Modifed Prepare, to check if Parameter is explicitly initialized
	* System.Data/System.Data.SqlClient/SqlParameter.cs :
		- Added CheckIfInitialized : Checks if datatype is explicitly set and
		non-zero size is set for variable datatypes.
	* System.Data/System.Data.SqlClient/SqlDataReader.cs :
		- Added code for GetSqlBinary ()
		- Fixed GetFieldCount ()
		- Added more checks and exceptions. 

Fixes most of the failing SqlClient Provider Tests .

svn path=/trunk/mcs/; revision=56167
2006-01-27 15:54:36 +00:00
Senganal T a34e1cf63d 2005-10-27 Senganal T <[email protected]>
* Mono.Data.Tds/Mono.Data.Tds.Protocol/Tds.cs :
		- Added a virtual method IsValidRowCount ()
		- Modified the way RecordsAffected is being counted

	* Mono.Data.Tds/Mono.Data.Tds.Protocol/Tds70.cs :
		- Overrode IsValidRowCount(), to check if the rowcount
		returned by sqlserver is valid.

	* System.Data/Test/ProviderTests/System.Data.SqlClient/SqlCommandTest.cs : 
		- Added Testcase for bug #75698

	* System.Data/System.Data.SqlClient/SqlCommand.cs 
	* System.Data/System.Data.SqlClient/SqlDataReader.cs :
		-Made changes so that the number of rows affected can be got directly 
		from Tds regardsless of the type of query.Fixes bug #75698

svn path=/trunk/mcs/; revision=52268
2005-10-27 10:46:11 +00:00
Sureshkumar T f943410d72 In System.Data/System.Data.SqlClient: Implemented asynchronous command execution.
In Mono.Data.Tds: Implemented asynchronous command execution at tds driver level.

Implemented by Sureshkumar T  <[email protected]> &  Ankit Jain  <[email protected]>


svn path=/trunk/mcs/; revision=42641
2005-04-07 14:25:50 +00:00