* 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
* SqlCommand.cs : Set CommandBehavior on
ExecuteReader,ExecuteScalar,ExecuteNonQuery. This is used in
CloseDataReader.
This fixes bug #73252.
svn path=/trunk/mcs/; revision=41519
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
* SqlCommand.cs : In the Execute Method the commandbehavior parameters were ignored correct
these Fixes bugs 59946 and 59948.
svn path=/trunk/mcs/; revision=30561
* SqlClientPermission.cs, SqlDataReader.cs - added missing methods with TODO tags
* SqlCommand.cs, SqlDataAdapter.cs - implemented ToolboxItemAttribute
* SQLDebugging.cs - Added new file with a TODO tag
svn path=/trunk/mcs/; revision=27229
2003-10-03 Diego Caravana <[email protected]>
* Tds70.cs: Now handles parameters of type ReturnValue and
InputOutput.
(BuildParameters): skips the ReturnValue params and builds the
set string considering the assigned value for InputOutput ones.
(BuildProcedureCall): like the preceding one plus adds the return
value to the final select.
-----
System.Data/System.Data.SqlClient/ChangeLog
2003-10-03 Diego Caravana <[email protected]>
* SqlCommand.cs: no change.
* SqlConnection.cs (Close): Added checks for null instance
variables.
* SqlParameter.cs (Direction): Now handles parameters of type
ReturnValue and InputOutput.
* SqlParameterCollection.cs (IndexOf(string)): Search for
SqlParameter object in list is done by obtaining ParameterName
attribute, not directly through list.IndexOf().
svn path=/trunk/mcs/; revision=18782
The following two fixes bug #40315.
* Tds.cs (ProcessEndToken): RecordsAffected was not filled
correctly. I've found out that the record count was submitted for
TdsPacketSubType.Done. So I changed the behaviour to include this
(without deeper knowledge of the TDS protocol). Patch from J�rg
Rosenkranz <[email protected]>.
* SqlCommand.cs (ExecuteNonQuery): Return
Connection.Tds.RecordsAffected if it is successful. Patch from
J�rg Rosenkranz <[email protected]>.
* ListControl.cs (DataSource): Implementation by Brian Takita
<[email protected]>.
svn path=/trunk/mcs/; revision=17498
* Mono.Data.Tds/Mono.Data.Tds.Protocol/Tds.cs:
(Disconnect): close the stream and set connected to false.
(NextResult): check if after DoneProc we have a ColumnMetadata + Row,
which holds the values for the output parameters and read them.
(LoadRow): add the values to outputParameters if DoneProc.
When executing a stored procedure, we execute the procedure and then
select the parameter values.
* Mono.Data.Tds/Mono.Data.Tds.Protocol/Tds70.cs:
(BuildParameters): check Parameters.
* Mono.Data.Tds/Mono.Data.Tds.Protocol/TdsComm.cs: added Close () to
close the stream.
* Mono.Data.Tds/Mono.Data.Tds.Protocol/TdsConnectionParameters.cs:
initialize all the string to be empty.
* System.Data/System.Data.SqlClient/SqlCommand.cs:
(CloseReader): don't get the output parameters here.
(GetOutputParameters): don't skip the stream. The parameters will be
there.
* System.Data/System.Data.SqlClient/SqlConnection.cs: don't try to
execute 'sp_reset_connection'.
* System.Data/System.Data.SqlClient/SqlDataReader.cs: get the output
parameters after the end of the results.
svn path=/trunk/mcs/; revision=9534
* System.Data.SqlClient/SqlCommand.cs:
* System.Data.SqlClient/SqlConnection.cs:
* System.Data.SqlClient/SqlDataReader.cs:
* System.Data.SqlClient/SqlParameter.cs:
* System.Data.SqlClient/SqlParameterCollection.cs:
* System.Data.SqlClient/SqlTransaction.cs:
Many changes around restructuring of parameter
information so that the Sybase provider supports
PREPAREs too.
svn path=/trunk/mcs/; revision=9193
* System.Data.SqlClient/SqlCommand.cs:
Add a TODO.
* System.Data.SqlClient/SqlDataReader.cs:
Add support to get SQL Types
* System.Data.SqlClient/SqlParameter.cs:
Add some comments to describe what is going on.
svn path=/trunk/mcs/; revision=9064
* System.Data.Common/DbDataPermission.cs:
* System.Data.SqlClient/SqlClientPermission.cs:
Make these agree on the class status page.
* System.Data.SqlClient/SqlCommand.cs:
- Fix up handling of GUID and [Var]Binary, and Image types
* System.Data.SqlClient/SqlParameter.cs:
- Provide support for conversion between Type,
DbType, SqlDbType, and the SQL server type names.
- Fix up handling of GUID and [Var]Binary types
* System.Data.SqlClient/SqlParameterCollection.cs:
Correct all of the Add methods.
* Test/SqlTest.cs:
- Add more types to test: unique identifier, binary,
image, smalldatetime, money, smallmoney, timestamp
svn path=/trunk/mcs/; revision=9003
* Test/SqlTest.cs:
- Add more types to test: unique identifier, binary
types.
* System.Data.SqlClient/SqlParameter.cs:
- Provide support for conversion between Type,
DbType, SqlDbType, and the SQL server type names.
- Fix up handling of GUID and [Var]Binary types
* System.Data.SqlClient/SqlCommand.cs:
- Fix up handling of GUID and [Var]Binary types
svn path=/trunk/mcs/; revision=8992
* System.Data.SqlClient/SqlCommand.cs:
Slight reformatting of Bit values and sql statements
* System.Data.SqlClient/SqlDataReader.cs:
Implement RecordsAffected
Complete SchemaTable
* System.Data.SqlClient/SqlParameter.cs:
Propertly support Char/NChar
* System.Data.SqlClient/SqlXmlTextReader.cs:
Add Close () to the Dispose () method
svn path=/trunk/mcs/; revision=8986
* Test/SqlTest.cs:
New class added for testing SqlClient
* System.Data.SqlClient/SqlCommand.cs:
Add handling for SqlDbType.Bit
* System.Data.SqlClient/SqlConnection.cs:
Implement Dispose () methods.
Change ConnectionString setter
* System.Data.SqlClient/SqlDataReader.cs:
Implement Dispose () methods.
Set RecordsAffected to -1 by default. Need to
set this correctly in the future.
* System.Data.SqlClient/SqlCommandBuilder.cs:
* System.Data.SqlClient/SqlDataAdapter.cs:
* System.Data.SqlClient/SqlTransaction.cs:
* System.Data.SqlClient/SqlXmlTextReader.cs:
Implement Dispose () methods.
svn path=/trunk/mcs/; revision=8975
* 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.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
* System.Data.SqlClient/SqlCommand.cs:
Use SET NO_BROWSETABLE ON when CommandBehavior is KeyInfo
* System.Data.SqlClient/SqlDataReader.cs:
Get more schema info if available
* list:
Add Mono.Data.TdsClient.Internal.TdsColumnStatus
svn path=/trunk/mcs/; revision=8791
* System.Data.SqlClient/SqlCommand.cs:
Change to use sp_executesql to run regular text queries.
Now, sp_executesql for text, sp_execute for prepared,
and execute for SPs means everything runs a procedure.
* System.Data.SqlClient/SqlParameter.cs:
Allow client to set parameter name in Prepare ()
* System.Data.SqlClient/SqlParameterCollection.cs:
Implement some methods
* System.Data.SqlClient/SqlDataReader.cs:
Since everything is an SP now, we know that when
we see DoneProc, that we are really done.
svn path=/trunk/mcs/; revision=8749
* System.Data.Common/DbEnumerator.cs :
Throw correct exception on Reset ()
Add ColumnSize to schema table.
* System.Data.SqlClient/SqlDataReader.cs :
Add ColumnSize to schema table.
* System.Data.SqlClient/SqlCommand.cs :
Change the way that preparing is handled.
Now uses sp_prepare on the server instead of temp
stored procedures because it's the Right Thing[tm] to do.
* System.Data.SqlClient/SqlConnection.cs :
Store data readers here rather than in command
* System.Data.SqlClient/SqlDataReader.cs :
More implementation, including binary types
* System.Data.SqlClient/SqlParameter.cs :
Lowercase type name
svn path=/trunk/mcs/; revision=8746
* System.Data.Common/FieldNameLookup.cs:
* System.Data.Common/SchemaInfo.cs:
* System.Data.SqlClient/SqlXmlTextReader.cs:
New classes added
* list :
Class list changed in build
* System.Data.SqlClient/SqlCommand.cs:
Added support for command behaviors
Refactored a bunch of code
Implement ExecuteScalar
Implement ExecuteXmlReader
* System.Data.SqlClient/SqlConnection.cs:
Moved CheckForErrors here
* System.Data.SqlClient/SqlDataAdapter.cs:
Code reformatting
* System.Data.SqlClient/SqlDataReader.cs:
Implement GetEnumerator
Fix NextResult, Read
Add SqlDataReaderEnumerator private class
* System.Data.SqlClient/SqlParameter.cs:
Move some of the Prepare code from SqlCommand to here
* System.Data.SqlClient/SqlTransaction.cs:
Move error checking to SqlConnection
svn path=/trunk/mcs/; revision=8703
* System.Data.SqlClient/SqlCommand.cs:
Added code to handle parameters for queries
* System.Data.SqlClient/SqlConnection.cs:
Properly handle resetting SqlConnections
* System.Data.SqlClient/SqlDataReader.cs:
Properly handle the case where no results are returned
* System.Data.SqlClient/SqlParameter.cs:
Default direction to Input
* System.Data.SqlClient/SqlParameterCollection.cs:
Implement GetEnumerator
svn path=/trunk/mcs/; revision=8670
* System.Data.SqlClient/SqlConnectionPool.cs:
New class added
* System.Data.SqlClient/SqlClientPermission.cs:
* System.Data.SqlClient/SqlClientPermissionAttribute.cs:
* System.Data.SqlClient/SqlInfoMessageEventArgs.cs:
* System.Data.SqlClient/SqlInfoMessageEventHandler.cs:
* System.Data.SqlClient/SqlParameter.cs:
* System.Data.SqlClient/SqlParameterCollection.cs:
Code reformatting
* System.Data.SqlClient/SqlCommand.cs:
* System.Data.SqlClient/SqlConnection.cs:
* System.Data.SqlClient/SqlException.cs:
* System.Data.SqlClient/SqlTransaction.cs:
New code based on work in TDS Client
* list:
New files added for SqlClient, and TdsClient.Internal
* System.Data.build:
Added reference to System.EnterpriseServices.dll
Still leave SqlClient out of build until danmorg
can fix.
svn path=/trunk/mcs/; revision=8552
* System.Data/DataRow.cs: don't throw exception
if DBNull is false. Had to do comment this line
to allow a typeof(Type).
* System.Data.SqlClient/SqlCommand.cs: the "DataType"
DataColumn and DataRows in a DataTable for a schema should
be typeof Type, not string. This is to make it
compatible with MS.NET
* System.Data.SqlClient/SqlConnection.cs: the
isolation level should be set before
beginning the transaction
* Test/SqlSharpCli.cs: change string to Type for
"DataType" from a DataRow in a DataTable
that contains a schema.
svn path=/trunk/mcs/; revision=8229
* System.Data.SqlClient/SqlCommand.cs: typo
should be CommandBehavior.KeyInfo
* Test/SqlSharpCli.cs: refactored and added a few more
features.
svn path=/trunk/mcs/; revision=4961
* System.Data/DataRow.cs: modified
support setting of DBNull.Value
using the Item indexer this[DataColumn]
* System.Data.SqlClient/SqlCommand.cs: modified
tweaks to show TODO's for other CommandBehavior.
Set AllowDBNull column to true for IsKey row
in schema DataTable.
* System.Data.SqlClient/SqlConnection.cs: modified
if transaction is in progress when a Close() is called,
do a transaction Rollback.
svn path=/trunk/mcs/; revision=4946
* Test/SqlSharpCli.cs: added file
My new toy. SQL# is a command-line tool to enter
SQL commands and queries using Mono System.Data.
It also serves as a test for Mono System.Data.
* System.Data.SqlClient/SqlCommand.cs: modified
- ExecuteNonQuery(), ExecuteScalar(), and ExecuteReader()
should handle the results from SQL Commands and Queries.
- Internal class SqlResult should not create schema Table
for the result from a SQL Command. Also, set the RecordsRetrieved
property for SqlDataReader.
- Closing the SqlDataReader should Close() the SqlConnection for
a CommandBehavior.CloseConnection.
- Set defaults for SqlResult
* System.Data.SqlClient/SqlConnection.cs: modified -
when SqlDataReader is Close()
should Close() the SqlConnection for
a CommandBehavior.CloseConnection. Changed internal Property
from OpenReader get/set to IsReaderOpen get and created
internal methods OpenReader()/CloseReader() for SqlCommand to call.
SqlConnection needs to be prevented from doing while SqlDataReader
is being used.
* System.Data.SqlClient/SqlDataReader.cs: modified -
call SqlCommand's OpenReader() internal method. get
RecordsRetrieved from SqlResult. set/reset default
values for SqlDataReader.
* Test/PostgresTest.cs
* Test/TestExecuteScalar.cs
* Test/TestSqlDataReader.cs: modified
for the Execute...() methods in SqlCommand
to test SQL Queries and Commands
* Test/System.Data_test.build: modified
exclude new file Test/SqlSharpCli.cs from
test build
svn path=/trunk/mcs/; revision=4944
* System.Data.SqlClient/SqlCommand.cs: include
the BaseColumnName in the schema table. Was missed before.
* System.Data.Common/DbDataAdapter.cs: Use DataTable
mappings so that the DataSet and DataTable are more closely tied.
Get schema information from the DataTable using GetSchemaTable ()
Various other little fixes
* System.Data.Common/DataColumnMappingCollection.cs:
* System.Data.Common/DataTableMapping.cs:
* System.Data.Common/DataTableMappingCollection.cs: Some
implementation, enough to be used by DbDataAdapter.
svn path=/trunk/mcs/; revision=4891
* System.Data.SqlClient/SqlCommand.cs: set
the "ProviderType" to the PostgreSQL type oid
* System.Data.SqlClient/SqlDataReader.cs: fix
for various properties and methods that
return meta data: Item indexers this[name] and this[index],
GetFieldType, GetName, and GetOrdinal. SqlDataAdapter
should work again.
svn path=/trunk/mcs/; revision=4873
* System.Data/DataRow.cs: change suggested
by tim: in Item indexer, do an EndEdit()
* System.Data.SqlClient/SqlCommand.cs: more
fixes to SqlResult. After setting each item in
the DataRow, do an AcceptChanges() to commit
the changes in the DataRow. For DataType, use a Type
of System.String since System.Type nor System.Object
seems to work.
* Test/TestSqlDataReader.cs
* Test/PostgresTest.cs: updated to to be on
the way schema table is suppose to work
svn path=/trunk/mcs/; revision=4863
* System.Data.SqlClient/ParmUtil.cs: added file - to
provide utility for conversion of input parameters
* System.Data.SqlClient/PostgresTypes.cs: added file -
moved the PostgreHelper class to here. May eventually
move the internal class PostgresTypes that's inside the
SqlConnection to here as well.
Handling of PostgreSQL <-> .NET types need to be though
out more. Also, the PostgreHelper has a method to convert
from .NET types to a string which can be put into used in
an SQL statement to execute against a PostgreSQL database.
This is the beginnings of parameters support. It currently
only supports input parameters. Still need to do output,
input/output, and return parameters.
* Test/TestSqlParameters.cs: new test to test the input
parameters in System.Data.SqlClient against a
PostgreSQL db.
* System.Data.SqlClient/PostgresLibrary.cs: moved
PostgresHelper class to file PostgresTypes.cs. Also
moved struct PostgresType there too.
* System.Data.SqlClient/SqlCommand.cs: added input
parameters support
* System.Data.SqlClient/SqlParameter.cs: got
SqlParameter to work
* System.Data.SqlClient/SqlParameterCollection.cs: got
SqlParameterCollection to work
* Test/System.Data_test.build: added files to exclude
from test build
* System.Data.SqlClient/SqlConnection.cs: release resources
no longer used
svn path=/trunk/mcs/; revision=4805