** Fixes #385028/#385029
* DbCommandBuilder.cs (CreateInsertCommand): Workaround for inserting
DEFAULT values to non-null-columns.
(GetInsertCommand): New overload added to handle above workaround.
(set_DataAdapter): Register for the RowUpdatingEventHandlers.
svn path=/trunk/mcs/; revision=144915
* SqlDataAdapter.cs (IDbDataAdapter.*Command): Revert some of my earlier
changes. Validate the incoming value as we use bases' implementation now.
Fixes failing tests.
* SqlParameter.cs (GetSqlValue): Simplify handling of SqlValue and SqlTypes.
(SqlTypeToFramworkType): Added support for SqlChars and SqlBytes types.
svn path=/trunk/mcs/; revision=139070
* More clean up of fix for #522624/#507663
* SqlCommandBuilder.cs: Appropriately handle rowUpdatingHandler and
more cleanup for 2.0 profile.
svn path=/trunk/mcs/; revision=139068
parameters on the 2.0 profile, and set SourceVersion to
Current on 1.0 profile. Changed accessibility of RefreshSchema
to public, and do not immediately create commands. Removed
CWL.
svn path=/trunk/mcs/; revision=122379
and SqlParameterTest.cs.
* DbCommandBuilder.cs (QuoteIdentifier): Throw NotSupportedException.
* DbDataAdapter.cs (Update): Add row causing concurrency violation
to DBConcurrencyException.
* OdbcCommandBuilder.cs (QuoteIdentifier): Escape QuoteSuffix
character(s) in unquoted identifier.
* SqlCommandBuilder.cs: Added missing checks for QuotePrefix and
QuoteSuffix on 2.0 profile, and return a zero-length string if
not set (or set to null) on 1.0 profile. Do not allow the value
of CatalogSeparator and SchemaSeparator to be changed from '.'.
Modified generated SQL to match MS. Added implementation for
QuoteIdenfifier. Modified parameters to match MS.
* SqlParameter.cs (SqlValue): Keep Value in sync.
* DbCommandBuilderTest.cs: Added test for QuoteIdentifier.
* OdbcCommandBuilderTest.cs: Enabled test for QuoteIdentifier.
* SqlCommandBuilderTest.cs: Added tests for CatalogLocation,
CatalogSeparator, ConflictOption, QuoteIdentifier, QuotePrefix,
QuoteSuffix and SchemaSeparator.
* SqlParameterTest.cs: Moved existing tests from ProviderTests
to increase their visibility. Added tests for type inference.
svn path=/trunk/mcs/; revision=122361
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
* SqlCommand.cs (Transaction, Connection): IDbCommand Transaction
and Connection can be set to null. Fixes bug 82189.
svn path=/trunk/mcs/; revision=83059
* 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
* 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
* 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
* 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
* Test/ProviderTests/System.Data.SqlClient/SqlCommandBuilderTest.cs :
- Corrected the testcase to check for queries corresponding to
ms.net 2.0
- verify that columns that do not allow nulls are not included
in the null-checks.
- Added testcase to check for DBConcurrencyException for
Delete Command.
- Check the DataType of the null-check parameters
* System.Data.Common/DbDataAdapter.cs :
* Update () : If the Update/Delete Query has a null check,
then populate the parameter value correctly.
* System.Data.SqlClient/SqlCommandBuilder.cs :
* CreateDeleteCommand ()
* CreateUpdateCommand ()
* CreateInsertCommand ()
- Changed the signature. Do not need DataRow parameter
as the Query generated is parametric.
- Correct the null-check term in the WhereClause, set the
correct properties for null-check parameter
fixes#78027
- Modified the generated query to match the query as
generated by 2.0. We now ignore null-check in the
whereclause if the Column does not allow nulls.
* ctor () : Set QuotePrefix and QuoteSuffix for 2.0 profile
* GetUpdateCommand ()
* GetInsertCommand ()
* GetDeleteCommand ()
- Do not create new command everytime. Create only if
not already created.
* RefreshSchema : Reset the commands.
svn path=/trunk/mcs/; revision=59175
* Mono.Data.Tds/Mono.Data.Tds.Protocol/Tds70.cs :
- ProcessColumnInfo () : Set IsAutoIncrement Value for the column.
* System.Data/Test/ProviderTests/System.Data.SqlClient/SqlCommandBuilderTest.cs :
- Added testcase to verify UpdateCommand created with AutoIncrement
columns.
* System.Data/Test/ProviderTests/ProviderIndependant/DataReaderTest : Added a test to verify if AutoIncrement
value is set in the SchemaTable.
svn path=/trunk/mcs/; revision=57689
* 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
* Test/ProviderTests/sqlserver.config : Modified the default login and password to 'monotester'
* Test/ProviderTests/System.Data.SqlClient/SqlCommandBuilderTest.cs : Added testcase for bug #77225
* System.Data.SqlClient/SqlCommandBuilder.cs
- Modified CreateNewCommand () : Clean up any existing parameter list
before reusing the command.Fixes #77225
svn path=/trunk/mcs/; revision=55668
* SqlCommandBuilder.cs: update command builder based on
OdbcCommandBuilder latest changes to fix regression
of bug 75552
svn path=/trunk/mcs/; revision=48347
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-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
* 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-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
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
* System.Data.SqlClient/SqlCommandBuilder.cs:
Change "where" variable name to "whereClause" at the
request of Rhys Weatherley <[email protected]>
svn path=/trunk/mcs/; revision=12488
* list:
Add new internal tds classes
* System.Data.Common/DbDataAdapter.cs:
* System.Data.SqlClient/SqlDataAdapter.cs:
Change event calling system
* System.Data.SqlClient/SqlClientPermission.cs:
* System.Data.SqlClient/SqlClientPermissionAttribute.cs:
* System.Data.SqlClient/SqlDataReader.cs:
Add comments
* System.Data.SqlClient/SqlCommand.cs:
Some changes to make consistent with .NET based on Sql server traces
Implement command timeout
* System.Data.SqlClient/SqlCommandBuilder.cs:
Make sure that we only build a command if key info found
* System.Data.SqlClient/SqlConnection.cs:
Change event calling system
Some changes to make consistent with .NET based on Sql server traces
Implement connection timeout
* System.Data.SqlClient/SqlConnectionPool.cs:
Implement connection timeout
* System.Data.SqlClient/SqlError.cs:
Implement ToString ()
* System.Data.SqlClient/SqlException.cs:
Mucho implementation and cleanup
* System.Data.SqlClient/SqlParameter.cs:
Implement Clone ()
* System.Data.SqlClient/SqlParameterCollection.cs:
Code cleanup
* System.Data.SqlClient/SqlTransaction.cs:
Move some of the transaction creation to SqlConnection to be consistent
with .NET SQL traces
svn path=/trunk/mcs/; revision=8906
* System.Data/DataRow.cs:
* System.Data/DataTable.cs:
Some fix-ups related to the DbDataAdapter to make it work.
* System.Data.Common/DbDataAdapter.cs:
Fix the Fill () and Update () methods. These now work
fairly well. Need mucho testing.
* System.Data.SqlClient/SqlCommandBuilder.cs:
Support table mappings and parameter source versions now.
* System.Data.SqlClient/SqlConnection.cs:
* System.Data.SqlClient/SqlTransaction.cs:
Add set accessor for transaction so that SqlTransaction.Commit ()
will remove itself from the connection.
* System.Data.SqlClient/SqlDataAdapter.cs:
Update/Insert/Delete command should be null by default.
* System.Data.SqlClient/SqlException.cs:
Remove a TODO attribute
* System.Data.SqlClient/SqlRowUpdatingEventArgs.cs:
Properly handle the SqlCommand object
svn path=/trunk/mcs/; revision=8889
* System.Data.Common/DbDataAdapter.cs:
Remove NotImplementedException in Dispose
* System.Data.Common/FieldNameLookup.cs:
Should be sealed
* System.Data.SqlClient/SqlCommand.cs:
Fix CommandText accessor (stack overflow)
Implement DeriveParameters method
* System.Data.SqlClient/SqlCommandBuilder.cs:
Implement this class
* System.Data.SqlClient/SqlConnection.cs:
Change application name to "Mono SqlClient Data Provider"
* System.Data.SqlClient/SqlDataReader.cs:
Add new schema information
* System.Data.SqlClient/SqlError.cs:
* System.Data.SqlClient/SqlErrorCollection.cs:
Remove internal methods, TODO attributes
* System.Data.SqlClient/SqlParameter.cs:
Add new internal constructor for DeriveParameters use
* System.Data.SqlClient/SqlParameterConverter.cs:
Add missing methods based on class status
svn path=/trunk/mcs/; revision=8864