Commit Graph
366 Commits
Author SHA1 Message Date
Tim Coleman 9efe5974b7 2002-11-04 Tim Coleman <[email protected]>
* list:
                Add Mono.Data.TdsClient.Internal.TdsBigDecimal
                Add System.Data.SqlClient.SqlParameterConverter
                Add System.Data.DataSysDescriptionAttribute
        * System.Data/DataSysDescriptionAttribute.cs:
                New class added
        * System.Data.Common/DbDataPermission.cs:
                Add CreateInstance method
        * System.Data.SqlClient/SqlClientPermission.cs:
        * System.Data.SqlClient/SqlError.cs:
                Add Serializable attribute
        * System.Data.SqlClient/SqlCommand.cs:
        * System.Data.SqlClient/SqlConnection.cs:
        * System.Data.SqlClient/SqlDataAdapter.cs:
        * System.Data.SqlClient/SqlParameter.cs:
                Add some missing property attributes
        * System.Data.SqlClient/SqlCommandBuilder.cs:
                Add some missing property attributes
                Implement properties
        * System.Data.SqlClient/SqlDataReader.cs:
                Implement missing methods
        * System.Data.SqlClient/SqlErrorCollection.cs:
                Implement the properties
        * System.Data.SqlClient/SqlException.cs:
                Remove extra property accessors
        * System.Data.SqlClient/SqlInfoMessageEventArgs.cs:
                Add internal constructor
        * System.Data.SqlClient/SqlParameterCollection.cs:
                Add internal constructor
                Add property attributes
        * System.Data.SqlClient/SqlParameterConverter.cs:
                New internal class added
        * System.Data.SqlClient/SqlRowUpdatedEventArgs.cs:
        * System.Data.SqlClient/SqlRowUpdatingEventArgs.cs:
                Remove destructor
        * System.Data.SqlTypes/SqlDecimal.cs:
                Add implicit conversion from TdsBigDecimal to SqlDecimal
        * System.Data.SqlTypes/SqlString.cs:
        * System.Data.SqlTypes/SqlInt16.cs:
        * System.Data.SqlTypes/SqlDateTime.cs:
                Change code to remove compiler warnings

svn path=/trunk/mcs/; revision=8813
2002-11-04 18:23:26 +00:00
Tim Coleman 17cbe76c5e 2002-11-03 Tim Coleman ([email protected])
* 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
2002-11-03 06:07:23 +00:00
Tim Coleman 0220434e8d 2002-11-02 Tim Coleman ([email protected])
* 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
2002-11-02 07:19:13 +00:00
Tim Coleman 1dde77bced 2002-11-01 Tim Coleman ([email protected]) :
* 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
2002-11-02 05:06:21 +00:00
Tim Coleman caf566cfdb 2002-11-01 Tim Coleman ([email protected]) :
* System.Data.Common/DbEnumerator.cs :
        * System.Data.SqlClient/SqlDataReader.cs :
                Add ColumnSize to schema table.

svn path=/trunk/mcs/; revision=8730
2002-11-01 13:32:37 +00:00
Tim Coleman 720dc4c05c 2002-10-31 Tim Coleman ([email protected])
* 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
2002-11-01 01:46:51 +00:00
Tim Coleman 285e282029 * list :
Add System.Data.Common/DbEnumerator.cs
	* System.Data.SqlClient/SqlDataReader.cs:
		Remove SqlDataReaderEnumerator -- use DbEnumerator instead
	* System.Data.Common/DbEnumerator.cs:
		New class added

svn path=/trunk/mcs/; revision=8709
2002-10-31 07:31:32 +00:00
Tim Coleman 8dfb296b20 2002-10-30 Tim Coleman ([email protected])
* 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
2002-10-31 06:20:08 +00:00
Tim Coleman e6b40a5d00 2002-10-29 Tim Coleman ([email protected])
* 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
2002-10-30 04:54:11 +00:00
Tim Coleman 7c9b013590 2002-10-28 Tim Coleman ([email protected])
* System.Data.SqlClient/SqlCommand.cs:
                Add some error handling
        * System.Data.SqlClient/SqlDataReader.cs:
                Add some error handling
                Add precision/scale to schema table
        * System.Data.SqlClient/SqlException.cs:
                Generate a SqlException from TDS error
                collection
        * System.Data.SqlClient/SqlTransaction.cs:
                Add some error handling

svn path=/trunk/mcs/; revision=8644
2002-10-29 03:40:49 +00:00
Tim Coleman 2d0f53e9c9 2002-10-25 Tim Coleman ([email protected])
* PostgresLibrary.cs :
	* PostgresTypes.cs :
		Remove unnecessary files.

svn path=/trunk/mcs/; revision=8564
2002-10-25 20:13:14 +00:00
Tim Coleman 990df43be3 2002-10-25 Tim Coleman ([email protected])
* SqlDataReader.cs :
		Fix compiler warning

svn path=/trunk/mcs/; revision=8563
2002-10-25 19:27:52 +00:00
Tim Coleman ff2e4bd22c 2002-10-25 Tim Coleman ([email protected])
* SqlDataReader.cs:
		Fix more build errors.

svn path=/trunk/mcs/; revision=8562
2002-10-25 19:17:46 +00:00
Tim Coleman 52d3e9e129 2002-10-25 Tim Coleman ([email protected])
* SqlDataReader.cs:
		Missed checking in this file before.

svn path=/trunk/mcs/; revision=8560
2002-10-25 18:49:16 +00:00
Tim Coleman 73b08bddcf 2002-10-25 Tim Coleman ([email protected])
* 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
2002-10-25 16:11:37 +00:00
Tim Coleman 17e21290e8 2002-10-25 Tim Coleman ([email protected])
* ParmUtil.cs:
		This file is no longer used.

svn path=/trunk/mcs/; revision=8551
2002-10-25 16:00:06 +00:00
Daniel Morgan 1810f3436a 2002-10-13 Daniel Morgan <[email protected]>
* 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
2002-10-14 00:19:06 +00:00
Daniel Morgan 175d7bd7d5 2002-08-22 Daniel Morgan <[email protected]>
* 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
2002-08-22 08:39:40 +00:00
Rodrigo Moya b23e7d5908 2002-08-13 Rodrigo Moya <[email protected]>
* System.Data.SqlClient/SqlDataAdapter.cs (DeleteCommand,
	InsertCommand, SelectCommand, UpdateCommand): removed 'new' keyword
	to avoid compiler warnings.

svn path=/trunk/mcs/; revision=6612
2002-08-13 15:48:49 +00:00
Rodrigo Moya 595f3b7a5c 2002-06-02 Francisco Jr. <[email protected]>
* System.Data.SqlClient/SqlParameterCollection.cs: implemented missing
	methods.

svn path=/trunk/mcs/; revision=5092
2002-06-02 14:46:11 +00:00
Daniel Morgan 8ac0b7fe99 2002-05-30 Daniel Morgan <[email protected]>
* 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
2002-05-30 09:07:01 +00:00
Daniel Morgan 51b401fe0f 2002-05-27 Daniel Morgan <[email protected]>
* 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
2002-05-27 10:00:28 +00:00
Daniel Morgan d0f2df2b41 2002-05-26 Daniel Morgan <[email protected]>
* 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
2002-05-26 11:57:30 +00:00
Daniel Morgan da59dd4d7f 2002-05-26 Daniel Morgan <[email protected]>
* 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
2002-05-26 07:26:52 +00:00
Tim Coleman df2142c86f 2002-05-24 Tim Coleman <[email protected]>
* 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
2002-05-24 17:42:12 +00:00
Tim Coleman 31df872b2e 2002-05-23 Tim Coleman <[email protected]>
* 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
2002-05-23 21:04:04 +00:00
Daniel Morgan e4d7494b38 2002-05-23 Daniel Morgan <[email protected]>
* 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
2002-05-23 00:28:02 +00:00
Daniel Morgan 133032ff33 2002-05-22 Daniel Morgan <[email protected]>
* 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
2002-05-22 17:59:12 +00:00
Daniel Morgan be51edc929 2002-05-22 Daniel Morgan <[email protected]>
* System.Data.SqlClient/SqlCommand.cs: more work on
	building the schema table

svn path=/trunk/mcs/; revision=4845
2002-05-22 02:27:20 +00:00
Tim Coleman fa28461d2b 2002-05-22 Tim Coleman <[email protected]>
* System.Data.SqlClient/SqlCommand.cs: preliminary work
        on getting the schema table correctly built.

svn path=/trunk/mcs/; revision=4844
2002-05-22 00:34:14 +00:00
Daniel Morgan 6d551e483a 2002-05-21 Daniel Morgan <[email protected]>
* 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
2002-05-21 01:29:30 +00:00
Daniel Morgan ec6e751eb5 2002-05-18 Daniel Morgan <[email protected]>
* 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
2002-05-18 15:17:15 +00:00
Daniel Morgan aafe0b2af2 2002-05-18 Daniel Morgan <[email protected]>
* 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
2002-05-18 13:20:24 +00:00
Daniel Morgan 264414caad 2002-05-17 Daniel Morgan <[email protected]>
* 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
2002-05-17 22:14:57 +00:00
Tim Coleman 4a45db8615 2002-05-17 Tim Coleman <[email protected]>
* 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
2002-05-17 16:38:00 +00:00
Tim Coleman a2896d3391 2002-05-16 Tim Coleman <[email protected]>
* 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
2002-05-16 02:34:45 +00:00
Tim Coleman f594cc033d 2002-05-13 Tim Coleman
* 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
2002-05-13 14:30:06 +00:00
Tim Coleman 4d74e0f9fc 2002-05-11 Tim Coleman
* 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
2002-05-11 23:21:09 +00:00
Tim Coleman 21b8422b9a 2002-05-11 Tim Coleman
* 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
2002-05-11 22:31:29 +00:00
Daniel Morgan 9f2f9dfac0 2002-05-11 Daniel Morgan <[email protected]>
* 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
2002-05-11 12:58:32 +00:00
Daniel Morgan 608ee73d25 2002-05-09 Daniel Morgan <[email protected]>
* 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
2002-05-09 19:59:29 +00:00
Daniel Morgan 0410d300b8 2002-05-04 Daniel Morgan <[email protected]>
* 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
2002-05-04 20:23:29 +00:00
Daniel Morgan bf85f10d6b 2002-05-03 Daniel Morgan <[email protected]>
* 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
2002-05-03 22:02:07 +00:00
Daniel Morgan 26625e0d8f 2002-05-03 Daniel Morgan <[email protected]>
* 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
2002-05-03 05:16:20 +00:00
Daniel Morgan 1fee921ab8 2002-05-02 Daniel Morgan <[email protected]>
* 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
2002-05-02 07:23:41 +00:00
Rodrigo Moya 2574cb7ae8 2002-05-01 Rodrigo Moya <[email protected]>
* 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
2002-05-01 17:49:21 +00:00
Rodrigo Moya d34894849b 2002-04-28 Rodrigo Moya <[email protected]>
* System.Data/DataViewManager.cs: new class.

	* System.Data.SqlTypes/INullable.cs: properties for interfaces
	don't have implementation.

	* System.Data.SqlTypes/SqlInt32.cs:
	* System.Data.SqlTypes/SqlString.cs:
	* System.Data.SqlTypes/SqlBoolean.cs: removed destructor, since
	these are strctures.

	* System.Data.SqlClient/SqlClientPermissionAttribute.cs: added
	missing 'using's.

svn path=/trunk/mcs/; revision=4109
2002-04-28 15:02:31 +00:00
Daniel Morgan 2744f2972e 2002-04-28 Daniel Morgan <[email protected]>
* 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
2002-04-28 03:59:01 +00:00
Daniel Morgan bcaf8e4bba 2002-04-27 Daniel Morgan <[email protected]>
* 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
2002-04-27 05:23:49 +00:00
Daniel Morgan ae9689e23b 2002-04-23 Daniel Morgan <[email protected]>
* ChangeLog: modified - put tabs where they belong

	* System.Data.SqlClient/SqlDataReader.cs
	* System.Data/DataColumn.cs: modified - compile errors
	trying to compile SqlDataAdapter and dependencies

svn path=/trunk/mcs/; revision=3993
2002-04-23 16:10:38 +00:00