Rosenkranz <[email protected]>. Currently, if a connection is
closed by an external event (network problem, etc.) it is pushed
back into the connection pool. The next Open call retrieves this
invalid connection which leads to exceptions when executing
statements.
This patch fixes this problem. This closes bug #47429.
svn path=/trunk/mcs/; revision=17431
* SqlConnection.cs: if Server in the ConnectionString
is set to "(local", use "localhost" as the hostname
to connect
svn path=/trunk/mcs/; revision=12521
* 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
* System.Data.SqlClient/SqlDataReader.cs: when
the data reader is closed, this SqlDataReader referenced
in SqlConnection needs to be null
* System.Data.Common/DbDataAdapter.cs: for SelectCommands executed that
have no result set, such as, DDL like CREATE TABLE or DML like INSERT,
the data reader needs to be immediately closed, and 0 returned
as the number of rows added or refreshed
svn path=/trunk/mcs/; revision=12403
* ChangeLog: added this file
* SqlConnection.cs: - parse data source for 3 possible uses:
"Server=hostname",
"Server=hostname\\instancename",
"Server=hostname,port" and open the connection based on the
resulting server name and port.
- Added support for named instances
by discovery of the sql server tcp port via the sql monitor (udp port 1434)
thanks to Phillip Jerkins ([email protected]) contribution.
Also, thanks to Gonzalo and Tim for their help with timeouts.
svn path=/trunk/mcs/; revision=11623
* System.Data.SqlClient/SqlConnection.cs:
* System.Data.SqlClient/SqlDataReader.cs:
Close the data reader properly, and be sure
to close the data reader when the connection
is closed.
svn path=/trunk/mcs/; revision=11492
* 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/SqlConnection.cs:
BeginTransaction bug.
* System.Data.SqlClient/SqlParameter.cs:
Add some comments to describe what is going on.
svn path=/trunk/mcs/; revision=9067
* 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/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
* 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/DbDataAdapter.cs :
Fix handling of nulls
* System.Data.Common/DbDataRecord.cs :
Change GetFieldType ()
* System.Data.Common/DbEnumerator.cs :
Add new schema information
* System.Data.Common/FieldNameLookup.cs :
Change definition of schema
* System.Data.Common/SchemaInfo.cs :
Add more information
* System.Data.SqlClient/SqlDataReader.cs :
get more schema table data
* list :
Add Mono.Data.TdsClient.Internal.TdsSchemaInfo
svn path=/trunk/mcs/; revision=8722
* 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/SqlParameter.cs: flush
* System.Data.SqlClient/SqlParameterCollection.cs: fixes
for the Item property, IndexOf, and Contains.
* Test/SqlSharpCli.cs: added input parameters support.
when a query is executed, if a parameter name matches
a SQL# internal variable name, it uses that value for the parameter; otherwise,
the user is prompted for the parameter value. Currently, it only supports
string parameters.
svn path=/trunk/mcs/; revision=6883