QuoteSuffix are not set (or are set to null). Changing QuotePrefix or
QuoteSuffix after a command has been generated should result in an
InvalidOperationException.
* DbConnectionStringBuilder.cs: Added support for ODBC rules. Major
rewrite fixing many compatibility issues, and improving support for
connectionstring formats/characters.
* System.Data_test.dll.sources: Added OdbcCommandBuilderTest.cs,
OdbcConnectionStringBuilderTest.cs and DbCommandBuilderTest.cs.
* libodbc.cs: Add IdentifierQuoteChar to OdbcInfo.
* OdbcCommandBuilder.cs: Return a zero-length string when QuotePrefix
or QuoteSuffix are not set (or are set to null). Changing QuotePrefix
or QuoteSuffix after a command has been generated should result in an
InvalidOperationException. Implemented support for obtaining
character(s) for quoting identifiers from specified connection.
Modified generated SQL to match MS.
* OdbcConnectionStringBuilder.cs: Improved special casing of Driver
and Dsn keywords. Re-use implemenation of DbConnectionStringBuilder.
Improved argument checks to match MS.
* DbCommandBuilderTest.cs: Added tests for QuotePrefix and
QuoteSuffix.
* DbConnectionStringBuilderTest.cs: Added tests for both odbc and
non-odbc rules.
* OdbcCommandBuilderTest.cs: Added tests for QuotePrefix and
QuoteSuffix. Added tests for QuoteIdentifier (some still marked
NotWorking).
* OdbcConnectionStringBuilderTest.cs: Moved from ProviderTests.
Added and improved tests.
svn path=/trunk/mcs/; revision=122225
* Index.cs (empty): New empty array constant.
(Reset): Initialize '_array' to 'empty'.
(RebuildIndex): Don't allocate array if it will be empty.
(FindAllIndexes): Use 'empty' instead of 'new int [0]'.
svn path=/trunk/mcs/; revision=119008
* Index.cs: Remove use of Array and Size properties by taking
advantage of the invariant that _array is never null.
(EnsureArray): Remove.
(Array): Remove.
svn path=/trunk/mcs/; revision=119007
* DataContainer.cs (*.ZeroOut): Rename from the somewhat unclear
'SetDefaultValue'.
(IsNull): Use a more idiomatic form of the short-circuit.
(*.SetValue): Convert to one-liners.
svn path=/trunk/mcs/; revision=112367
* System.Data.Common/DbConnectionStringBuilder.cs: Keys and Values
get properties should return a ReadOnlyCollection
svn path=/trunk/mcs/; revision=111751
* System.Data.Common/DataContainer.cs (DataContainer): Rename from
AbstractDataContainer.
Introduce new 'protected abstract' members to encapsulate
type-specific handling, and move all common code here.
(DataContainer.Create): Rename from CreateInstance.
* System.Data/DataColumn.cs: Update to changes in DataCollection.
(Since a majority of the lines are changed, I decided to dos2unix the file
too)
svn path=/trunk/mcs/; revision=110002
* DbDataReader.cs: Replace a few Type.GetType by typeof
[Found using Gendarme AvoidTypeGetTypeForConstantStringsRule]
svn path=/trunk/mcs/; revision=107358
* DbProviderFactoriesConfigurationHandler.cs : Create() now takes
parent DataSet into consideration i.e. it now merges items in
different configurations. Fixed bug #323708.
svn path=/trunk/mcs/; revision=89701
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
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
Leaves it up to deriving classes to override Dispose (bool) and
perform a rollback if necessary. Fixes bug #325397. Code formatting.
* ExceptionHelper.cs: Added TransactionNotUsable method that constructs
an InvalidOperationException to be thrown by IDbTransaction
implementations when the transaction is no longer open.
* OdbcTransaction.cs: Keep state of the transaction, and update it
when performing commit or rollback. In Dispose (bool), only perform
a rollback if transaction was not committed or rollback before.
In Commit and Rollback, throw an InvalidOperationException if
transaction is no longer open.
* SqlTransaction.cs: Avoid unnecessary initialization. Remove
isRolledBack since its essentially the same as isOpen. Use
ExceptionHelper.TransactionNotUsable instead of duplicating code.
On 2.0 profile, ignore call to Rollback when transaction was already
disposed.
* OleDbTransaction.cs: Keep track of whether transaction is open and
whether it's disposed. In Commit an Rollback, throw an IOE if the
transaction is no longer open. In Dispose (bool), perform a rollback
if the transaction is still open.
svn path=/trunk/mcs/; revision=87835
* DbConnectionStringBuilder.cs (Init): Modified the dictionary to
use StringComparer.InvariantCultureIgnoreCase.
(Add, ContainsKey): Checks whether argument is null or empty string.
svn path=/trunk/mcs/; revision=80465
* ConnectionStringsExpressionBuilder.cs: support expressions with
suffixes .ProviderName and .ConnectionString (case-insensitie) and
generate a call to GetConnectionStringProviderName in the former
case. Fixes bug #81490
2007-04-30 Marek Habersack <[email protected]>
* SqlDataSource.cs: do not catch the exception if ProviderName is
not null or empty (as per docs and what MS.NET does).
2007-04-30 Marek Habersack <[email protected]>
* DbProviderFactories.cs: throw the same exception MS.NET does.
svn path=/trunk/mcs/; revision=76486
of clear and remove nodes.
* DbProviderFactoriesConfigurationHandler.cs: Added support for
clear node.
* DbProviderFactoriesConfigurationHandlerTest.cs: Changed test to also
verify behavior for clear and remove nodes.
svn path=/trunk/mcs/; revision=73663
pass on MS. Added NotWorking test to check whether DbProviderFactories
that are defined on machine config are available.
* ConnectionStringsSectionHandler.cs: Removed since the 2.0 config
API is in place.
* DbProviderFactoriesConfigurationHandler.cs: Fixed name of DataSet
to match MS. Removed SupportedClasses column since this is no longer
part of 2.0 profile (removed during beta). Throw
ConfigurationErrorsException for unrecognized elements. Mark methods
private, and refactor them. Added FIXMEs for missing checks for
unrecognized attributes.
* DbProviderFactories.cs: Marked constants internal. Replaced spaces
with tabs. Use ConfigurationManager.GetSection instead of deprecated
ConfigurationSettings.GetConfig.
* app_test_2.0.config: Fixed assembly qualified names of config
handler. Removed usage of ConnectionStringsSectionHandler, since
this is now handled by 2.0 config system. Spaces to tabs.
* System.Data.dll.sources: Removed ConnectionStringsSectionHandler.
svn path=/trunk/mcs/; revision=73659
* DbProviderFactoriesConfigurationHandler.cs : remove "support"
attribute check, as it does not really do anything.
svn path=/trunk/mcs/; revision=73417
* DbProviderFactory.cs: Derived class has to implement all the
methods of this class.
* DbProviderFactoriesConfigurationHandler.cs (Create): Removed
bogus MonoTODO
svn path=/trunk/mcs/; revision=72538