* 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
* System.Data.SqlClient/SqlConnection.cs: modifed -
start to implement the interfaces properly and
properly doing a Close(), Dispose(), and
releasing resources
* Test/SqlSharpCli.cs: modified -
add support for MySQL in Mono.Data.MySql
and OleDb support in System.Data.OleDb. However,
the OleDb support is commented right now.
When the program starts up, a shorter help menu should
display the most important commands: help and quit
svn path=/trunk/mcs/; revision=5023
* 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.Common/DbDataAdapter.cs: remove IDbCommands, except
for get accessors. These should be implemented in derived classes. See
SqlDataAdapter for clues.
* System.Data.SqlClient/SqlDataAdapter.cs: implement IDbDataAdapter
* System.Data.Common/DataAdapter.cs:
* System.Data.Common/DataTableMappingCollection.cs:
* System.Data.Common/DataTableMapping.cs:
* System.Data.Common/DataColumnMappingCollection.cs:
* System.Data.Common/DataColumnMapping.cs:
Properly (I hope!) implement all of the appropriate interfaces
for these classes.
svn path=/trunk/mcs/; revision=4908
* 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
* System.Data.SqlClient/SqlCommand.cs: handle CommandTypes
Text, TableDirect, and StoredProcedure
* Test/PostgresTest.cs: changed call to version()
stored procedure to use the CommandType of StoredProcedure
* Test/TestSqlDataReader.cs: test all the CommandTypes
svn path=/trunk/mcs/; revision=4743
* System.Data.build: took out all excluded
files except the ones in the Test directory
because all files compile now. It does not
mean they all work or have implementations
though.
* System.Data/DataRelationCollection.cs
* System.Data/DataTableRelationCollection.cs
* System.Data/InternalDataCollectionBase.cs
* System.Data.Common/DbDataPermission.cs
* System.Data.SqlClient/SqlInfoMessageEventArgs.cs
* System.Data.SqlClient/SqlClientPermission.cs
* System.Data.SqlClient/SqlClientPermissionAttribute.cs: changes
to get all System.Data* files to compile.
* System.Data.SqlClient/SqlCommand.cs: started coding
to prevent SqlConnection and SqlCommand from doing
anyting while fetching data using SqlDataReader. Also,
started coding to undo this prevention once the
SqlDataReader is closed.
* System.Data.SqlClient/SqlConnection.cs: get database server
version. Started coding to prevent connection from
doing anything while fetching data and undo once the reader
is closed. Include events SqlInfoMessage and StateChange.
* System.Data.SqlClient/SqlDataReader.cs: start coding to
prevent connection and command from doing anything while
fetching data, and undo when closed.
* Test/PostgresTest.cs: added test to get ServerVersion
property from SqlConnection
svn path=/trunk/mcs/; revision=4742
* System.Data.SqlClient/PostgresLibrary.cs: handle
data value from database being NULL
* System.Data.SqlClient/SqlCommand.cs: for ExecuteReader,
allow multiple result sets. Added new internal class
SqlResult to pass result set data from SqlCommand
to SqlDataReader.
* System.Data.SqlClient/SqlDataReader.cs: allow
multiple result sets.
* System.Data.SqlClient/SqlConnection.cs: moved
things around. Implement IDisposable.
* Test/TestSqlDataReader.cs: test for execution
of multiple result sets and display the results
of these multiple results sets
* Test/TestSqlDataAdapter.cs: tweaks
svn path=/trunk/mcs/; revision=4733
* System.Data.Common/DbDataAdapter.cs:
- More implementation of Fill methods
- Get rid of isDirty flag, because we can just check
if the table exists
- Do *not* remove DataTables before Filling them
- Implicitly open the connection before doing a Fill
if it does not exist.
* System.Data.SqlClient/SqlDataAdapter.cs:
- Minor fixup
* System.Data/DataTableCollection.cs:
- Add DataSet to internal, undocumented constructor
- When a table is created, set its DataSet property
- Default table name for creation is "Table1" (see .NET)
- Inherit the ArrayList list from InternalDataCollecitonBase
and maintain a hashtable between table names and
DataTables
* System.Data/DataTable.cs:
- Add internal dataSet field. This is used by
DataTableCollection when the DataTable is constructed.
* System.Data/DataSet.cs:
- Pass a reference to the DataSet when constructing the
DataTableCollection.
svn path=/trunk/mcs/; revision=4722
* System.Data.SqlClient/SqlDataReader.cs:
Modify GetValues to use Array.Copy() to copy
the results from fields to values, rather than
an assignment, which results in loss of data.
svn path=/trunk/mcs/; revision=4674
* System.Data/DataTableCollection.cs:
Fix an issue when adding a DataTable and size == 0.
Now explicitly checks if size > 0 before doing Array.Copy ()
* System.Data.Common/DbDataAdapter.cs:
Move closer to a working implementation.
Make the IDbCommand fields protected so that they can
be inherited.
* System.Data.SqlClient/SqlDataAdapter.cs:
This should inherit the IDbCommands instead of having its
own. An explicit cast is used to force conversion between
IDbCommand and SqlCommand
svn path=/trunk/mcs/; revision=4588
* System.Data.SqlClient/SqlDataAdapter.cs:
* System.Data.Common/DbDataAdapter.cs:
Moved methods that weren't supposed to
be in SqlDataAdapter out. They should be implemented
in DbDataAdapter.
svn path=/trunk/mcs/; revision=4545
* System.Data.SqlClient/SqlDataAdapter.cs:
some implementation of this class. Note
that none of the functionality has been
tested yet, but I felt it should be checked
in at this point as it compiles.
* System.Data.SqlClient/SqlRowUpdatingEventArgs.cs:
* System.Data.SqlClient/SqlRowUpdatedEventArgs.cs:
Modified so that they will compile properly.
Needed to include SqlDataAdapter in the build.
* System.Data.build:
Add SqlDataAdapter, SqlRowUpdatingEventArgs,
SqlRowUpdatedEventArgs, SqlRowUpdatingEventHandler,
SqlRowUpdatedEventHandler to the build.
svn path=/trunk/mcs/; revision=4543
* System.Data.build: added copy of System.Data.dll to Test directory
for easy testing. Also, added clean for it too.
* System.Data.SqlClient/PostgresLibrary.cs: changed setting of boolean
from PostgreSQL data type to .NET type.
* System.Data.SqlClient/SqlDataReader.cs: beginnings
handling of a NULL value from the database
* Test/PostgresTest.cs: added tests for NULL values retrieved
from the database
* Test/ReadPostgresData.cs
* Test/TestExecuteScalar.cs
* Test/TestSqlDataReader.cs
* Test/TestSqlException.cs
* Test/TestSqlIsolationLevel.cs: updated tests to use databas user
"postgres". These tests may eventually be removed since they
are not flexible.
svn path=/trunk/mcs/; revision=4529
* System.Data.SqlClient/PostgresLibrary.cs: got
PostgreSQL data types time, date, timestamp (DateTime like)
mapped to .NET System.DateTime working based
on ISO DateTime formatting "YYYY-MM-DD hh:mi:ss.ms"
Also mapped pg type boolean to .net Boolean
* SqlClient/SqlConnection.cs: run SQL command to set
Date style to ISO
* Test/PostgresTest.cs: added test for an UPDATE SQL command,
added tests for aggregates min(), max(), sum(), count(). could
not get avg() to work due to some formatting error; someone claimed
that it was my locale settings. added tests for SELECT of columns
of type boolean, float, double, date, time, and timestamp. They
have not been fully tested, but its a start.
svn path=/trunk/mcs/; revision=4457
* System.Data.SqlClient/PostgresLibrary.cs
* System.Data.SqlClient/SqlCommand.cs
* System.Data.SqlClient/SqlConnection.cs
* System.Data.SqlClient/SqlDataReader.cs
oid should not be hard coded because they
can change from one version of PostgreSQL
to the next. Use the typname's instead.
The PostgreSQL type data retrieves
at database connection time. Any unimplemented
types just default to string. These were things
suggested by Gonzalo.
* Test/ReadPostgresData.cs - stuff
* Test/TestSqlDataReader.cs - stuff
* System.Data.SqlTypes/SqlInt32.cs - added a using
svn path=/trunk/mcs/; revision=4281
* System.Data.build: removed comments
* System.Data.SqlClient/PostgresLibrary.cs: changed
the hard-coded PostgreSQL oid type int's to using an
enum. Also, added PostgreSQL bpchar (character) type.
* Test/TestSqlDataReader.cs: updated test
to include new bpchar PostgreSQL type
svn path=/trunk/mcs/; revision=4260
* Test/TestExecuteScalar.cs: added test for
method ExecuteScalar in class SqlCommand.
* System.Data/DataColumnCollection.cs - it should
inherit properties from base InternalDataCollectionBase
and use them instead of overriding them, such as, List.
* System.Data/DataColumn.cs
* System.Data/DataTable.cs: tweaks to retrieve
meta data from the database
* System.Data.SqlClient/PostgresLibrary.cs -
added method OidToType to convert PostgreSQL oid type
to System.Type. Renamed method OidTypeToSystem
to ConvertPgTypeToSystem for converting the data value
from a PostgreSQL type to a .NET System type.
* System.Data.SqlClient/SqlCommand.cs: implemented
method ExecuteReader which returns a SqlDataReader
for a light forward only read only result set.
It works on types int4 ==> Int32 and
varchar ==> String. Other types
will come later.
* System.Data.SqlClient/SqlConnection.cs: added comment
* System.Data.SqlClient/SqlDataReader.cs: implemented
class. It works, but still lots to do.
* Test/ReadPostgresData.cs: stuff
* Test/TestSqlDataReader.cs: updated test for SqlDataReader
to display meta data and the data
svn path=/trunk/mcs/; revision=4247
* System.Data.SqlClient/PostgresLibrary.cs: included new
internal class that will be a helper class in using
PostgreSQL. PostgresLibrary is used for the
pinvoke methods to the PostgreSQL Client
native C library libpq while the class PostgresHelper
is used for wrapper or helper methods. It currently only
has one static method OidTypeToSystem in converting
PostgreSQL types to .NET System.<type>s, such as,
a PostgreSQL int8 becomes a .NET System.Int64.
Only a few types have been added, such as, int2,
int4, int8, varchar, text, bool, and char. Other types
will come later.
* System.Data.SqlClient/SqlCommand.cs: implemented
method ExecuteScalar which allows us to do aggregate
functions, such as, count, avg, min, max, and sum. We
also are able to retrieve the result, convert it to the .NET type
as an object. The user of the returned object must explicitly cast.
* Test/ReadPostgresData.cs: updated sample
to help us learn to retrieve data in System.Data.SqlClient
classes
svn path=/trunk/mcs/; revision=4217
* System.Data.SqlClient/SqlClientPermission.cs: added missing
'using's.
* System.Data/MergeFailedEventArgs.cs: new class, contributed
by John Dugaw <[email protected]>.
* System.Data.build: excluded new files from build.
svn path=/trunk/mcs/; revision=4198
* System.Data/DataRelation.cs
* System.Data/ForeignKeyConstraint.cs
* System.Data/UniqueConstraint.cs: added more stubs
* System.Data/DataTableRelationCollection.cs: added back to cvs
and modified for compile errors. DataRelationCollection is an
abstract class and there must be a class that implements for
DataTable/DataSet. DataTableRelationCollection was changed
to an internal class.
* System.Data.build: modified - new files added
also wanted to include files/classes in the build
so we can get a compilable forward read only result set.
It compiles now using csc/nant with warnings, but this
is a start for adding functionality for the result set.
Classes associated with/and DataSet are still excluded.
* TODO: modified - updated to do list for System.Data
* System.Data/Constraint.cs
* System.Data/ConstraintCollection.cs
* System.Data/DataRelationCollection.cs
* System.Data/DataRow.cs
* System.Data/DataRowChangeEventArgs.cs
* System.Data/DataRowCollection.cs
* System.Data/DataTable.cs
* System.Data/DataTableCollection.cs
* System.Data/InternalDataCollectionBase.cs
* System.Data/PropertyCollection.cs: modified -
changes to compile SqlDataReader/DataTable and
dependencies
* System.Data/IDbCommand.cs
* System.Data.SqlClient/SqlCommand.cs: modified -
un-commented overloaded methods ExecuteReader
which returns a SqlDataReader
svn path=/trunk/mcs/; revision=4098
* System.Data/DataRowChangeEventArgs.cs
* System.Data/DataRowCollection.cs
* System.Data/DataView.cs
* System.Data/PropertyCollection.cs: added new stubs
* System.Data.build: modified - added new files to exclude
from build
* TODO: modified - removed files from TODO list
that were stubbed above
* System.Data/DataColumn.cs
* System.Data/DataRow.cs: modified - various tweaks
and added internal method SetTable to set the reference
to a DataTable
* System.Data/DataSet.cs: modified - class was not
completely stubbed.
* System.Data/DataTable.cs: modified - temporarily commented
DataSet and DataView references - trying to compile a SqlDataReader,
DataTable, and dependencies for a forward read-only result set.
SqlDataAdapter, DataSet, and DataView will come later once we can get
a forward read only result set working.
* System.Data/IDataRecord.cs: modified - source code lines should
not be > 80
* System.Data/InternalDataCollectionBase.cs: modified - started
implementing this base class for collection of data rows,
columns, tables, relations, and constraints
* System.Data.SqlClient/SqlException.cs: modified -
call base(message) so a unhandled exception displays
the message of a SQL error instead of the
default SystemException message
* Test/TestSqlException.cs: modified -
handle the rollback properly for a SqlException on a
failure to connect
svn path=/trunk/mcs/; revision=4079