Commit Graph
188 Commits
Author SHA1 Message Date
Sureshkumar T cd5dec364e 2005-09-24 Sureshkumar T <[email protected]>
* SqlParameterCollection.cs (AddWithValue): added method. patch
	from [email protected] (Andy Waddell).


svn path=/trunk/mcs/; revision=50675
2005-09-24 15:44:19 +00:00
Senganal T 694cd01513 In Mono.Data.Tds:
* Mono.Data.Tds.Protocol/Tds.cs: 
		- Modified the way Server Version number is calculated
		- Added a new varaible to remember the original database
		connected to and to reset the Database property when the
		connection to database is closed.
	* Mono.Data.Tds.Protocol/Tds70.cs: 
		modified Reset() to Call the Reset() of base class which 
		in turn resets the database name. 

In System.Data/Test/ProviderTests/System.Data.SqlClient:

	* SqlConnectionTest.cs: removed some hardcoded database names
	in DatabasePropertyTest ().

In System.Data/System.Data.SqlClient:
	* SqlConnection.cs : 
		- Set the correct Default Values for Parameters.
		- Added Argument Checks (where missing) for the Properties and 
		throw the correct exception on error.
		- Modified SetDefaultParameters() to make sure that the parameters
		are all reset to default values everytime it is called.
		- Modified SetProperties() to take into account the order of the 
		keywords in the ConnectionString.

svn path=/trunk/mcs/; revision=50377
2005-09-21 14:27:58 +00:00
Senganal T 57f5f5502c * SqlTransaction.cs : Modifed the Rollback() method, so that
connection can be used for another transaction after the previous
	transaction is rolled back. fixes bug 75904


svn path=/trunk/mcs/; revision=50364
2005-09-21 10:39:52 +00:00
Umadevi S 69c849468f Removed SqlResultSet.cs file
svn path=/trunk/mcs/; revision=49316
2005-09-02 05:42:51 +00:00
Sureshkumar T 8164beede8 In System.Data/System.Data.SqlClient:
2005-08-26  Sureshkumar T  <[email protected]>

	* SqlConnection.cs (Open): enable sp_reset_connection.

In Mono.Data.Tds/Mono.Data.Tds.Protocol:
2005-08-26  Sureshkumar T  <[email protected]>

	* Tds70.cs (ExecProc): if no parameters, execute via RPC. parameter
	support has to be added.

	* Tds.cs (ExecRPC): added virtual method to execute via RPC.

	This fixes bug #68978 by enabling execution of sp_reset_connection.


svn path=/trunk/mcs/; revision=48881
2005-08-26 09:31:43 +00:00
Sureshkumar T 8e196718dc 2005-08-25 Sureshkumar T <[email protected]>
* SqlCommandBuilder.cs: BuildInformation (): continue on columns
	who don't have basetablename.


svn path=/trunk/mcs/; revision=48816
2005-08-25 06:42:35 +00:00
Daniel Morgan 5bc290120d 2005-08-12 Daniel Morgan <[email protected]>
* SqlCommandBuilder.cs: update command builder based on
	OdbcCommandBuilder latest changes to fix regression 
	of bug 75552

svn path=/trunk/mcs/; revision=48347
2005-08-12 23:24:11 +00:00
Sureshkumar T 43bef71bf3 In System.Data.Common:
2005-08-05  Sureshkumar T  <[email protected]>

	* DbDataAdapter.cs:
	- Update (): set parameter values only after getting the
	appropriate command from command builder. Close reader only if it
	is not closed before. Use parameter's SourceVersion. Whitespace
	corrections to comply with standard.

In System.Data.SqlClient:
2005-08-05  Sureshkumar T  <[email protected]>

	* SqlCommandBuilder.cs: Set SourceVersion property to the created
	parameters as it is used by the Adapter's Update method.

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

	* OdbcDataReader.cs: RecordsAffected: get value from command.
	GetSchemaTable (): set IsExpression based on BaseTableName. set
	AllowDBNull to false if the column is PK.

	* OdbcCommand.cs: correct UpdatedRowSource is returned. whitespace
	changes to conform to standard.

	* OdbcCommandBuilder.cs: Implemented.

	* OdbcParameter.cs: Direction is set to Input by default.


svn path=/trunk/mcs/; revision=48043
2005-08-05 14:59:55 +00:00
Sureshkumar T 88fba070be In System.Data.Common:
2005-07-22  Sureshkumar T  <[email protected]>

	* DataColumnMappingCollection.cs: updated attributes & attribute
	descriptions to match with masterinfos.

In System.Data.SqlClient:
2005-07-22  Sureshkumar T  <[email protected]>

	* SqlCommandBuilder.cs, SqlParameterCollection.cs,
	SqlConnection.cs, SqlParameter.cs:
	- updated attributes & attribute descriptions to match with
	masterinfos.

In System.Data:
	* DataViewSettingCollection.cs, DataTableCollection.cs,
	DataSet.cs, DataView.cs, DataColumn.cs, ForeignKeyConstraint.cs,
	DataRelationCollection.cs, UniqueConstraint.cs, DataTable.cs,
	DataColumnCollection.cs, DataRelation.cs, DataSet.cs:
	- updated attributes & attribute descriptions to match with
	masterinfos.

In System.Data.Odbc:
	* OdbcParameter.cs: updated attributes & attribute descriptions to
	match with masterinfos.


svn path=/trunk/mcs/; revision=47554
2005-07-22 10:57:02 +00:00
Daniel Morgan 6b8af86de0 2005-07-16 Daniel Morgan <[email protected]>
* SqlCommandBuilder.cs: CreateUpdateCommand should get the current value, not
	the orginal value when setting one of the SET variables

svn path=/trunk/mcs/; revision=47357
2005-07-16 11:37:36 +00:00
Sureshkumar T 425bc04d75 In System.Data.Common:
2005-07-15  Sureshkumar T  <[email protected]>

	* DataTableMappingCollection.cs: GetTableMappingBySchemaAction:
	meaningful error message if mapping is missing.

	* DbDataAdapter.cs: Update: meaningful message if table is missing.

In System.Data.SqlClient:
2005-07-15  Sureshkumar T  <[email protected]>

	* SqlCommandBuilder.cs:
	- set_DataAdapter: unsubscribe event if DataAdapter is reset.
	- CreateInsertCommand, CreateUpdateCommand, CreateDeleteCommand:
	if column mapping is missing, use the source column name. use
	proper version to get the data. 
	- RowUpdatingHandler: set status to continue to actually process
	the query.


svn path=/trunk/mcs/; revision=47340
2005-07-15 13:15:36 +00:00
Ben Maurer b69683c917 2005-07-04 Ben Maurer <[email protected]>
* SqlError.cs: Patch from [email protected] to fix serialization.


svn path=/trunk/mcs/; revision=46916
2005-07-04 19:40:43 +00:00
Sureshkumar T be58549d6e 2005-06-29 Sureshkumar T <[email protected]>
* Mono.Data.Tds/Mono.Data.Tds.Protocol/TdsInternalException.cs: Add ctor for InnerException.
	* Mono.Data.Tds/Mono.Data.Tds.Protocol/TdsComm.cs: Throw TdsInternalException rather than
	  SocketException.
	* System.Data/System.Data.SqlClient/SqlConnection.cs: Open (): catch TdsInternalException and throw
	  SqlException.
	* System.Data/System.Data.SqlClient/SqlException.cs: code re-organised to pass message as well with
	  the exception.


svn path=/trunk/mcs/; revision=46722
2005-06-29 13:31:18 +00:00
Ben Maurer a68aa2eda4 remove executable bit from changelogs
svn path=/trunk/mcs/; revision=46563
2005-06-27 15:53:16 +00:00
Sureshkumar T 3c8687039f 2005-06-23 Sureshkumar T <[email protected]>
* System.Data.SqlClient/SqlConnectionStringBuilder.cs: simplified multiple keyword
          mappings and allowed-key checking. fixed Item, Remove, ContainsKey, ShoudSerialize,
          TryGetValue implementations.
        * Test/System.Data.SqlClient/SqlConnectionStringBuilderTest.cs: Added few more tests.


svn path=/trunk/mcs/; revision=46422
2005-06-23 13:13:04 +00:00
Sureshkumar T 6809aa66f4 2005-06-21 Sureshkumar T <[email protected]>
* System.Data.Common/DbConnectionStringBuilder.cs: Implemented method for parsing
	  connection string through "ConnectionString" property.
	* System.Data.Common/DbConnectionStringBuilderHelper.cs: Helper class to provide
	  conversion between string=>.net type mapping for connection string
	  builders. The idea is to use between other providers (odbc) as well.
	* System.Data.SqlClient/SqlConnectionStringBuilder.cs: Connection String Builder class
	  for SqlClient Data Provider.
	* Test/System.Data.SqlClient/SqlConnectionStringBuilderTest.cs: Added some preliminary tests.
	* System.Data.dll.sources: Added SqlConnectionStringBuilder.cs and DbConnectionStringBuilderHelper.cs
	* System.Data_test.dll.sources: Added SqlConnectionStringBuilderTest.cs


svn path=/trunk/mcs/; revision=46289
2005-06-21 09:56:41 +00:00
Gonzalo Paniagua Javier 204dad79dd 2005-06-01 Gonzalo Paniagua Javier <[email protected]>
* SqlParameter.cs: moved the 'using S.D.SqlTypes' out of NET_2_0. Fixes
	the build.


svn path=/trunk/mcs/; revision=45291
2005-06-01 09:06:08 +00:00
Sureshkumar T b7661e984e 2005-06-01 Sureshkumar T <[email protected]>
* SqlParameter.cs: Parameter's value can be SqlTypes. Convert to
	framework type to pass to TDS layer. Fixes bug #75044.


svn path=/trunk/mcs/; revision=45289
2005-06-01 08:29:39 +00:00
Ben Maurer 2a81dac63f locking fixes
svn path=/trunk/mcs/; revision=45085
2005-05-26 23:06:52 +00:00
Umadevi S 633ecff54e fixed some 2.0 and 1.0 specific fields/attributes for various classes.
* Added SqlClientMetaDataCollectionNames.cs, Implemented some 2.0
        properties for SqlParameterCollection for the bulkcopy feature.
                                                                                                    

svn path=/trunk/mcs/; revision=44964
2005-05-25 03:33:30 +00:00
Kornél Pál c6e989717a Fixed Bug #53169
svn path=/trunk/mcs/; revision=44841
2005-05-20 18:06:02 +00:00
Umadevi S aa454d616c Fixed Bug 74948 - SqlParameter also takes DBNull Value.
Correct some attributes stuff of 1.1 and 2.0 for SqlParameter.cs

svn path=/trunk/mcs/; revision=44791
2005-05-20 05:37:42 +00:00
Umadevi S 65a6069971 Continuing on implementation for bulkcopy and notification
Added files SqlNotificationEventArgs.cs, OnChangeEventHandler.cs
                Modified SqlRowUpdatingEventArgs.cs

svn path=/trunk/mcs/; revision=44785
2005-05-20 02:41:41 +00:00
Umadevi S bf84b105c1 * For implementation of bulkcopy and notifications added files
SqlBulkCopyOptions.cs,SqlBulkCopyColumnMapping.cs,SqlNotificationAuthType.cs
                SqlNotificationTransports.cs,SqlRowsCopiedEventArgs.cs, SqlRowsCopiedEventHandler.cs                                                                                                    

svn path=/trunk/mcs/; revision=44740
2005-05-19 08:40:20 +00:00
Umadevi S a9b4965cad Corrected types,enum values of SqlNotificationType,SqlNotificationSource,
SqlNotificationInfo and added new method in SqlRowUpdatingEventArgs.cs
        (For implementation of bulkcopy/notifications)

svn path=/trunk/mcs/; revision=44738
2005-05-19 08:18:39 +00:00
Sureshkumar T 8aa5f5eafd 2005-04-19 Sureshkumar T <[email protected]>
* SqlDataReader.cs: NextResult (): Re-create schema table for each
	result set. don't re-use, as it may be referenced from somewhere.


svn path=/trunk/mcs/; revision=43240
2005-04-19 08:54:04 +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
Sureshkumar T a20bdd56e5 2005-03-28 Sureshkumar T <[email protected]>
* SqlCommand.cs: Execute: Add a semicolon at the end of
	CommandText. Multiple semicolon's are not being complained.

	fixes bug #74134.


svn path=/trunk/mcs/; revision=42305
2005-03-28 10:45:48 +00:00
Gonzalo Paniagua Javier ea1707ac6f 2005-03-11 Gonzalo Paniagua Javier <[email protected]>
* SqlConnection.cs: added a finalizer for correct implementation of the
	IDisposable pattern.


svn path=/trunk/mcs/; revision=41722
2005-03-11 21:12:45 +00:00
Gonzalo Paniagua Javier ec84c7c397 2005-03-11 Gonzalo Paniagua Javier <[email protected]>
* SqlException.cs: make it serialization-compatible with MS. Patch by
	Aleksandar Dezelin. Closes bug #73596.


svn path=/trunk/mcs/; revision=41721
2005-03-11 21:11:27 +00:00
Sureshkumar T c04cfcb57c In System.Data.ProviderBase:
2005-03-08  Sureshkumar T  <[email protected]>

	* 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  <[email protected]>

	* 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 08:38:20 +00:00
Sureshkumar T 6bcb9cca06 err.. forgot to remove Console.WriteLine debug message.
svn path=/trunk/mcs/; revision=41521
2005-03-07 13:43:30 +00:00
Sureshkumar T aa267ef781 2005-03-07 Sureshkumar T <[email protected]>
* SqlCommand.cs : Set CommandBehavior on
	ExecuteReader,ExecuteScalar,ExecuteNonQuery. This is used in
	CloseDataReader.

	This fixes bug #73252.


svn path=/trunk/mcs/; revision=41519
2005-03-07 13:30:52 +00:00
Sureshkumar T 97133615a0 In System.Data.ProviderBase:
2005-03-02  Sureshkumar T  <[email protected]>

	* DbConnectionBase.cs: CreateDbCommand: assign connection to the
	created command.

In .:
2005-03-02  Sureshkumar T  <[email protected]>

	* System.Data.dll.sources: Added
	System.Data.SqlClient/SqlConnectionFactory.cs.

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

	* SqlClientFactory.cs: While creating command, create using
	DbConnectionFactory as DbConnectionBase.CreateDbCommand needs to
	have a connection factory.

	* SqlConnection.cs: Added an internal constructor which takes
	DbConnectionFactory.

	* SqlConnectionFactory.cs: Added. Concrete class for abstract
	factory DbConnectionFactory.


svn path=/trunk/mcs/; revision=41382
2005-03-03 04:30:14 +00:00
Sureshkumar T 01bb726ef7 2005-02-22 Sureshkumar T <[email protected]>
* SqlDataReader.cs: GetBytes: return the length of the data if
        output buffer is null. if not, copy the values to buffer and
        return the bytes actually read.


svn path=/trunk/mcs/; revision=41026
2005-02-22 09:37:19 +00:00
Sureshkumar T 3361135cce 2005-02-02 Sureshkumar T <[email protected]>
* SqlConnection.cs: 
	- Database: return db name from database if connection open,
	otherwise take from connection string.
	- Set default values for parameters in the constructor itself.
	- Dangling else problem with Close method.
	- reset values of parms (TdsConnectionParameters) rather setting
	to null.
	- set disposed to false in Open method
	- finally call base.Dispose in Dispose (bool)

	Fixes nunit regressions SqlConnectionTest:DefaultConnectionValues
	and SqlConnectionTest:DatabaseSynonyms.	


svn path=/trunk/mcs/; revision=39974
2005-02-02 10:42:30 +00:00
Sureshkumar T 0c88f4428c 2005-01-27 Sureshkumar T <[email protected]>
* SqlCommand.cs (DeriveParameters): Change parameter name to
	"procedure_name".
	* SqlParameter.cs (SqlParameter (object [])) : call default
	constructor to create Tds.Metaparameter.

	fixes bug #63122.


svn path=/trunk/mcs/; revision=39636
2005-01-27 11:18:28 +00:00
Sureshkumar T 369684c152 2005-01-03 Sureshkumar T <[email protected]>
* SqlCommand.cs: Fixed bug #68973. Reset Tds.RecordsAffected to 0
	for each execute statement.
	

svn path=/trunk/mcs/; revision=38270
2005-01-03 12:31:29 +00:00
Sureshkumar T ebcc19d3c5 2004-11-25 Sureshkumar T <[email protected]>
These changes are for 2.0 profile only. These changes implement
	the generic data base access technique using Provider Factory
	Implementation. These classes need to be dervided from abstract
	base classes so that the corresponding factory classes are
	created when calling CreateCommand, CreateParameter, etc.
	
	* SqlClientFactory.cs: Provider Factory class  Implementaion for SqlServer
	* SqlParameter.cs: Change base classes and override methods.
	* SqlParameterCollection.cs:  Change base classes and override methods.
	* SqlTransaction.cs:  Change base classes and override methods.
	* SqlDataSourceEnumerator.cs: DataSource Enumerator stubs.
	* SqlDataReader.cs: Change base classes and override methods.
	* SqlConnection.cs: Change base classes and override methods.
	* SqlCommandBuilder.cs: Change base classes and override methods.
	* SqlCommand.cs: Change base classes and override necessary methods.


svn path=/trunk/mcs/; revision=36527
2004-11-25 09:54:04 +00:00
Umadevi S c7949f2d08 2004-10-14 Umadevi S <[email protected]>
* SqlCommand.cs - Implemented the clone method correctly.
         (fixed bug 67301)

svn path=/trunk/mcs/; revision=34964
2004-10-14 04:39:04 +00:00
Umadevi S 8de1969f14 2004-10-06 Umadevi S <[email protected]>
* ISqlNoticationReceiver.cs - changed namespace
        * Added files SqlNotificationType.cs, SqlNotificationInfo.cs, SqlNotificationSource.cs

svn path=/trunk/mcs/; revision=34744
2004-10-06 04:20:14 +00:00
Umadevi S c813754f8d 2004-09-24 Umadevi S <[email protected]>
* SqlTransaction.cs - Dispose will not call rollback incase the transaction is not open.

svn path=/trunk/mcs/; revision=34339
2004-09-24 09:56:09 +00:00
Sebastien Pouliot 51ffd060a9 2004-09-14 Sebastien Pouliot <[email protected]>
* SqlClientPermission.cs: Added internal constructor accepting an Sql
	ClientPermissionAttribute parameter (using base class protected ctor).
	* SqlClientPermissionAttribute.cs: Copy now use the new SqlClient
	Permission constructor.

svn path=/trunk/mcs/; revision=33905
2004-09-14 20:02:48 +00:00
Sebastien Pouliot de76dcbb20 Fix NET_2_0 build.
svn path=/trunk/mcs/; revision=33837
2004-09-14 00:09:24 +00:00
Sebastien Pouliot c321305e8d 2004-09-13 Sebastien Pouliot <[email protected]>
* SqlClientPermission.cs: Mostly completed (needs tests).
	* SqlClientPermissionAttribute.cs: Completed.

svn path=/trunk/mcs/; revision=33832
2004-09-13 23:32:54 +00:00
Umadevi S b4fda1b3a6 2004-09-02 Umadevi S <[email protected]>
* SqlCommand.cs - ExecuteNonQuery to return -1 incase of executing a storedprocedure

svn path=/trunk/mcs/; revision=33196
2004-09-02 08:30:16 +00:00
Gert Driesen bf01809f62 SqlConnection.cs: added TODO on ConnectionString for keywords
that are not yet implemented. check value of Integrated Security
        keyword, check value of bool keywords, improve error reporting
        for int keywords, added support for the following keyword
        synonyms : APP, TIMEOUT, NETWORK, PERSISTSECURITYINFO, WSID,
        LANGUAGE, USER. Throw NotImplementedException when encrypt keyword
        is set to true, enlist keyword is set to false or attachdbfilename
        keyword (or one of its synonyms) is set. Added FIXME for PERSIST
        SECURITY INFO keyword, throwing a NotImplementedException here
        would break lots of apps

svn path=/trunk/mcs/; revision=32516
2004-08-19 06:44:05 +00:00
Gert Driesen 8ddc1dfe83 * SqlConnection.cs - spaces to tabs
svn path=/trunk/mcs/; revision=32387
2004-08-16 15:59:04 +00:00
Sureshkumar T 10ea22496f 2004-08-12 Sureshkumar T <[email protected]>
* SqlDataReader.cs - In Close method, the remaining resultsets are drained
			     out, to read output parameters & to avoid stream overlap

svn path=/trunk/mcs/; revision=32258
2004-08-12 09:44:48 +00:00
Umadevi S e2e9c7e803 2004-06-30 Umadevi S <[email protected]>
* SqlCommand.cs : In the Execute Method the commandbehavior parameters were ignored correct
these Fixes bugs 59946 and 59948.

svn path=/trunk/mcs/; revision=30561
2004-06-30 04:23:58 +00:00