Commit Graph
97 Commits
Author SHA1 Message Date
Sureshkumar T 807abd8d52 2005-08-08 Sureshkumar T <[email protected]>
* OdbcDataReader.cs: Implemented Dispose pattern. Cache
	schematable for same result set. don't free command's statements
	if the command is prepared.

	* OdbcCommand.cs:
	- Implemented Dispose pattern
	- Streamlined the allocation and de-allocation of statement
	handles.


svn path=/trunk/mcs/; revision=48120
2005-08-08 13:02:16 +00:00
Sureshkumar T 249ad86de4 * OdbcConnection.cs: Open (): set disposed to false so that close
will be called in Dispose.


svn path=/trunk/mcs/; revision=48119
2005-08-08 11:48:14 +00:00
Sureshkumar T 4d2591b6b3 2005-08-08 Sureshkumar T <[email protected]>
* OdbcCommand.cs: Prepare (): Split SQLPrepare and SQLBind so that
	already prepared statements can be reused with new parameter
	values. ExecSQL (): create new statement handle, if not prepared
	and there are no parameters. if there are parameters, prepare and
	use.


svn path=/trunk/mcs/; revision=48118
2005-08-08 11:46:00 +00:00
Sureshkumar T 43bef71bf3 In System.Data.Common:
2005-08-05  Sureshkumar T  <[email protected]>

	* DbDataAdapter.cs:
	- Update (): set parameter values only after getting the
	appropriate command from command builder. Close reader only if it
	is not closed before. Use parameter's SourceVersion. Whitespace
	corrections to comply with standard.

In System.Data.SqlClient:
2005-08-05  Sureshkumar T  <[email protected]>

	* SqlCommandBuilder.cs: Set SourceVersion property to the created
	parameters as it is used by the Adapter's Update method.

In System.Data.Odbc:
2005-08-05  Sureshkumar T  <[email protected]>

	* OdbcDataReader.cs: RecordsAffected: get value from command.
	GetSchemaTable (): set IsExpression based on BaseTableName. set
	AllowDBNull to false if the column is PK.

	* OdbcCommand.cs: correct UpdatedRowSource is returned. whitespace
	changes to conform to standard.

	* OdbcCommandBuilder.cs: Implemented.

	* OdbcParameter.cs: Direction is set to Input by default.


svn path=/trunk/mcs/; revision=48043
2005-08-05 14:59:55 +00:00
Sureshkumar T 88fba070be In System.Data.Common:
2005-07-22  Sureshkumar T  <[email protected]>

	* DataColumnMappingCollection.cs: updated attributes & attribute
	descriptions to match with masterinfos.

In System.Data.SqlClient:
2005-07-22  Sureshkumar T  <[email protected]>

	* SqlCommandBuilder.cs, SqlParameterCollection.cs,
	SqlConnection.cs, SqlParameter.cs:
	- updated attributes & attribute descriptions to match with
	masterinfos.

In System.Data:
	* DataViewSettingCollection.cs, DataTableCollection.cs,
	DataSet.cs, DataView.cs, DataColumn.cs, ForeignKeyConstraint.cs,
	DataRelationCollection.cs, UniqueConstraint.cs, DataTable.cs,
	DataColumnCollection.cs, DataRelation.cs, DataSet.cs:
	- updated attributes & attribute descriptions to match with
	masterinfos.

In System.Data.Odbc:
	* OdbcParameter.cs: updated attributes & attribute descriptions to
	match with masterinfos.


svn path=/trunk/mcs/; revision=47554
2005-07-22 10:57:02 +00:00
Sureshkumar T f85959cd0b In System.Data:
2005-07-22  Sureshkumar T  <[email protected]>

	* DataView.cs: changed protected members
	rowstate,rowcache,dataTable to protected internal.
	* Constraint.cs, ForeignKeyConstraint.cs, UniqueConstraint.cs:
	changed InConstraintViolated to protected internal.
	* ConflictOptions.cs, UpdateOptions.cs, FillOptions.cs: enclosed
	with NET_2_0 define.

In System.Data.Odbc:
2005-07-22  Sureshkumar T  <[email protected]>

	* OdbcDataReader.cs: NextRow (): made private.

	Formatting corrections. Fixes bug #75574.

svn path=/trunk/mcs/; revision=47547
2005-07-22 06:38:27 +00:00
Sureshkumar T 07913b599a 2005-07-21 Sureshkumar T <[email protected]>
* OdbcDataReader.cs: GetValue (): added case for OdbcType.Bit. and
	Formatting corrections.


svn path=/trunk/mcs/; revision=47510
2005-07-21 11:05:55 +00:00
Sureshkumar T 2a02207697 2005-07-07 Sureshkumar T <[email protected]>
* OdbcTypeConverter.cs: ConvertToSqlType & ConvertToSqlCType: map
	VarChar to SQL_C_CHAR and SQL_VARCHAR respective instead of WCHAR
	and WVARCHAR as temporary fix.

	* OdbcParameter.cs: setBuffer: string types need not be quoted.


svn path=/trunk/mcs/; revision=47041
2005-07-07 15:47:53 +00:00
Sureshkumar T 0594791a49 2005-06-28 Sureshkumar T <[email protected]>
* OdbcDataReader.cs: GetPrimaryKeys (): use the length indicator
	for GetString, otherwise, it creates a string of length 255. Use
	ArrayList for keys as the columns are different from the selected
	columns. fixes bug #75263.


svn path=/trunk/mcs/; revision=46641
2005-06-28 11:50:14 +00:00
Ben Maurer 0e8decdb37 remove svn:executable from .cs files
svn path=/trunk/mcs/; revision=46562
2005-06-27 15:51:40 +00:00
Sureshkumar T 0f9933ca8e 2005-06-09 Sureshkumar T <[email protected]>
* System.Data.Odbc/OdbcDataReader.cs: GetValue (): return decimal in case of odbc
	type Numeric. Move the temp buffer logic inside.

	* System.Data.Odbc/OdbcTypeConverter.cs: map SQL_TYPE.NUMERIC to SQL_C_TYPE.CHAR by
	now, since PgSql driver seems not to accept NUMERIC c type. Other
	database anyway, provides NUMERIC datatype as DECIMAL.


svn path=/trunk/mcs/; revision=45683
2005-06-09 10:30:34 +00:00
Sureshkumar T 01c8d2d89c 2005-05-31 Sureshkumar T <[email protected]>
* OdbcParameter.cs: setBuffer (): for numeric type, the buffer
	parameter should be a packed decimal struct. fixes bug #75041.


svn path=/trunk/mcs/; revision=45245
2005-05-31 10:01:08 +00:00
Ben Maurer 2a81dac63f locking fixes
svn path=/trunk/mcs/; revision=45085
2005-05-26 23:06:52 +00:00
Sureshkumar T d7571f6a6e 2005-04-05 Sureshkumar T <[email protected]>
* OdbcParameter.cs: SqlBindParameter requires the last parameter
	to be a ref.
	* libodbc.cs: API change for above.


svn path=/trunk/mcs/; revision=42553
2005-04-05 09:25:59 +00:00
Sureshkumar T 867af6a6c1 2005-04-04 Sureshkumar T <[email protected]>
* OdbcDataReader.cs: Ignore BaseTableName & BaseColumnName
	properties while building Schema information as most drivers
	ignores these properties. e.g. PostgreSQL.


svn path=/trunk/mcs/; revision=42505
2005-04-04 08:27:22 +00:00
Sureshkumar T 49454d397d 2005-03-24 Sureshkumar T <[email protected]>
Appasamy <[email protected]>

	* OdbcColumn.cs: IsStringType: OdbcType.Char is also of type
	String.
	* OdbcDataReader.cs: GetSchemaTable: Get Additional info using
	SQLColAttribute. Don't pad with spaces in GetColAttributeStr.


svn path=/trunk/mcs/; revision=42220
2005-03-24 15:26:48 +00:00
Sureshkumar T 67465db331 GetOrdinal: Perform case insensitive lookup if sensitive lookup fails.
svn path=/trunk/mcs/; revision=42214
2005-03-24 14:23:30 +00:00
Sureshkumar T eb0d2c56eb 2005-03-24 Sureshkumar T <[email protected]>
* OdbcDataReader.cs: Decode only outsize length for
	SQL_C_TYPE.CHAR type in SQLGetData.


svn path=/trunk/mcs/; revision=42211
2005-03-24 13:55:59 +00:00
Sureshkumar T fbf1f2c678 2005-03-22 Sureshkumar T <[email protected]>
Appsamy <[email protected]>

	* libodbc.cs (System.Data.Odbc): Added enum FieldIdentifier. Added
	library functions SQLPrimaryKeys, SQLBindCol and SQLColAttribute.

	* OdbcDataReader.cs: Implemented GetPrimaryKeys to get the primary
	keys associated with resultset using SQLPrimaryKeys.


svn path=/trunk/mcs/; revision=42071
2005-03-22 09:19:13 +00:00
Sureshkumar T 03a5e795d2 mark internal for SQL_C_TYPE
svn path=/trunk/mcs/; revision=42070
2005-03-22 09:12:02 +00:00
Sureshkumar T 12ea47e504 2005-03-15 Sureshkumar T <[email protected]>
* OdbcConnection.cs: re-throw error on exception in Open method.


svn path=/trunk/mcs/; revision=41836
2005-03-15 15:00:50 +00:00
Sureshkumar T ad03cf4661 In System.Data.ProviderBase:
2005-03-11  Sureshkumar T  <[email protected]>

	* DbConnectionBase.cs : Implemented OnStateChange.

In System.Data.Odbc:
	NET_2_0 uses base class's OnStateChange handler.

svn path=/trunk/mcs/; revision=41679
2005-03-11 07:36:58 +00:00
Sureshkumar T 9edfba2f90 2005-03-11 Sureshkumar T <[email protected]>
* OdbcConnection.cs : notify state change through event. clean up
	handles in case any exception while opening a connection.


svn path=/trunk/mcs/; revision=41678
2005-03-11 07:25:22 +00:00
Sureshkumar T b1ab44391f In .:
2005-03-10  Sureshkumar T  <[email protected]>

	* System.Data.dll.sources: Added
	System.Data.Odbc/OdbcConnectionFactory.cs. 
	System.Data.Odbc/OdbcFactory.cs.

In System.Data.Odbc:
2005-03-10  Sureshkumar T  <[email protected]>

	Migrated core classes to derive from ProviderBase instead of
	implementing IDb* interfaces. Most part of these files have been
	branched with #if NET_2_0/ONLY_1_1. Make sure any changes works
	with both the profiles.

	* OdbcFactory.cs: Concrete Factory for DbProviderFactory. Factory
	to generate Connection,Command,etc.

	* OdbcConnectionFactory.cs: Concrete factory for DbConnectionFactory.

	* OdbcTransaction.cs: migration and overrides.
	* OdbcCommandBuilder.cs: migration and overrides.
	* OdbcDataReader.cs: --do--. no command behavior member as it will
	be maintained in base provider class.
	* OdbcParameterCollection.cs: --do--. Now, local ArrayList is not
	maintained here, instead it is in base class. Most of the methods
	which operated on this list are not needed in NET_2_0.
	* OdbcConnection.cs: Migration. connectionString is maintained in
	DbConnectionBase class.
	* OdbcParameter.cs: Migration. Many of the local members like
	value,sourceColumn are maintained in DbParameterBase.
	* OdbcCommand.cs: Migration. commandText,timeout and
	commandTimeOut are maintained in DbCommandBase class.


svn path=/trunk/mcs/; revision=41643
2005-03-10 12:48:43 +00:00
Sureshkumar T b3148ef3a3 In .:
2005-03-10  Sureshkumar T  <[email protected]>

	* System.Data.dll.sources: Added
	System.Data.Odbc/OdbcTypeConverter.

In System.Data.Odbc:
2005-03-10  Sureshkumar T  <[email protected]>

	* OdbcType.cs: Added enums for SQL_TYPE & SQL_C_TYPE.
	
	* libodbc.cs: Accept SQL_C_TYPE for driver
	parameters. SQLBindParameter takes two parameters SQL_TYPE and
	SQL_C_TYPE. This caused the whole lot of changes done in this
	revision.
	
	* OdbcParameter.cs: Set default values of OdbcType & DbType. Pass
	mapped SQL_TYPE and SQL_C_TYPE to SQLBindParameter. Increase
	buffer size by 2 for additional ' chars.
	
	* OdbcTypeConverter.cs: Added class to convert between OdbcType,
	SQL_TYPE, SQL_C_TYPE.
	
	* OdbcColumn.cs: Added private members for SQL_TYPE and
	SQL_C_TYPE. conversion from/to odbctype to/from SQL_TYPE is done
	through OdbcTypeConverter class.
	
	* OdbcDataReader.cs: use OdbcColumn's SQL_C_TYPE member. It keeps
	track of default mapping between odbctype, SQL_TYPE and
	SQL_C_TYPE. Move dataTableSchema.AcceptChanges inside if condition
	to avoid null reference exception.


svn path=/trunk/mcs/; revision=41640
2005-03-10 09:13:45 +00:00
Sureshkumar T c577c68901 2005-02-04 Sureshkumar T <[email protected]>
Appasamy <[email protected]>

	* OdbcConnection.cs: Implemented properties database, datasource,
	serverversion and driver.
	* libodbc.cs: Added type OdbcInfo and native call SQLGetInfo.


svn path=/trunk/mcs/; revision=40134
2005-02-04 14:23:19 +00:00
Sureshkumar T 5b84e7ba4d 2005-01-20 Sureshkumar T <[email protected]>
* OdbcDataReader.cs: case for type OdbcType.Double added in
	GetValue.  fixes bug #71173.

	Thanks to patch given by "Appasamy T" <[email protected]>


svn path=/trunk/mcs/; revision=39236
2005-01-20 08:20:19 +00:00
Sureshkumar T 0d1e0487e4 2005-01-19 Sureshkumar T <[email protected]>
* OdbcType.cs: Change enum values for compatiability with MS.NET.
	* libodbc.cs: Change enum values for compatiability with
	MS.NET. Change calls into driver with native type.
	* OdbcDataReader.cs: Change enum values for compatiability with
	MS.NET. Change calls from/into driver with native type.


svn path=/trunk/mcs/; revision=39140
2005-01-19 09:05:15 +00:00
Sureshkumar T 5b2b357f80 2005-01-18 Sureshkumar T <[email protected]>
* OdbcDataReader.cs: GetOrdinal need not check for
	currentRow. Return -1 if column name is not found.

	fixes bug #71261. Thanks to patch given by "Appasamy T"
	<[email protected]>.


svn path=/trunk/mcs/; revision=39093
2005-01-18 15:09:10 +00:00
Sureshkumar T cc54e322fa 2005-01-13 Sureshkumar T <[email protected]>
* OdbcDataReader.cs: Implement NextResultSet for multiple result
	set queries. 
	
	* OdbcDataReader.cs: build column schema once creating reader and
	then for each Next result set. Thanks to
	[email protected] (Sebastien Robitaille) for
	pointing out this optimization (bugzilla #70530).

	* libodbc.cs: Added library calls SQLFreeStmt and SQLMoreResults
	for mutiple resultsets.


svn path=/trunk/mcs/; revision=38868
2005-01-13 12:40:08 +00:00
Sureshkumar T 15ce53bc54 2005-01-10 Sureshkumar T <[email protected]>
* OdbcDataReader.cs: Connection has to be closed only after
	Statement handle is freed. fixes bug #70048.


svn path=/trunk/mcs/; revision=38606
2005-01-10 11:43:46 +00:00
Sureshkumar T 2489990fda 2005-01-07 Sureshkumar T <[email protected]>
* OdbcDataReader.cs: Pass OdbcCType.SignedBigInt for accessing big
	int columns.

	* OdbcType.cs: Added a new enum for Odbc C DataTypes. This should
	essentially be passed to drivers, since the public OdbcType types
	differs from types expected in drivers in some cases.

	* libodbc.cs : Added a ODBC method which takes OdbcCType
	enumeration for SQLGetData for BigInt fields.

	fixes bug #65342.


svn path=/trunk/mcs/; revision=38485
2005-01-07 11:23:03 +00:00
Duncan Mak 41bba174eb 2004-12-28 Duncan Mak <[email protected]>
* libodbc.cs: Change all the DllImport attributes to point to
	"odbc32.dll" instead of "odbc32", because /etc/mono/config lists
	"odbc32.dll" (all other entries in the file have the .dll suffix
	as well, for consistency's sake, let's rename it here.)

	This fixes #70727.
	

svn path=/trunk/mcs/; revision=38151
2004-12-29 04:19:23 +00:00
Sureshkumar T 7ee7ead2d3 2004-12-03 Sureshkumar T <[email protected]>
* OdbcParameter.cs: Fixed a null reference exception when a
	parameter is created and its value is not set. #68750.


svn path=/trunk/mcs/; revision=37020
2004-12-03 14:27:19 +00:00
Sureshkumar T c84add4d94 2004-11-26 Sureshkumar T <[email protected]>
In System.Data.Odbc:
	* OdbcParameter.cs: Fixed Parameter Size property as well as
	insufficient buffer errors. bug #68749.

In Test/System.Data.Odbc:
	* OdbcParameterCollectionTest.cs: New file for testing
	OdbcParameterCollection's Add method.


svn path=/trunk/mcs/; revision=36621
2004-11-26 07:50:48 +00:00
Sebastien Pouliot aa6904913d 2004-09-14 Sebastien Pouliot <[email protected]>
* OdbcPermission.cs: Added internal constructor accepting an Odbc
	PermissionAttribute parameter (using base class protected ctor).
	* OdbcPermissionAttribute.cs: Copy now use the new OdbcPermission
	constructor.

svn path=/trunk/mcs/; revision=33903
2004-09-14 19:58:41 +00:00
Sebastien Pouliot de76dcbb20 Fix NET_2_0 build.
svn path=/trunk/mcs/; revision=33837
2004-09-14 00:09:24 +00:00
Sebastien Pouliot 70d02a3c3d 2004-09-13 Sebastien Pouliot <[email protected]>
* OdbcPermission.cs: Mostly completed (needs tests).
	* OdbcPermissionAttribute.cs: Completed.

svn path=/trunk/mcs/; revision=33830
2004-09-13 23:29:25 +00:00
Umadevi S 0287ee0f81 2004-08-31 Umadevi S ([email protected])
* OdbcDataReader.cs - Fixed Decimal parsing

svn path=/trunk/mcs/; revision=33073
2004-08-31 03:44:04 +00:00
Umadevi S e86e45c47c 2004-08-30 Umadevi S ([email protected])
* OdbcType.cs - removed inheritance from short.

svn path=/trunk/mcs/; revision=33030
2004-08-30 07:51:44 +00:00
Sureshkumar T 260bc6abbe 2004-08-27 Sureshkumar T ([email protected])
* OdbcDataReader.cs - fixed bug #63539 - TINYINT ODBC datatype is converted into System.Byte

svn path=/trunk/mcs/; revision=32923
2004-08-27 12:08:45 +00:00
Sureshkumar T c477b47d09 2004-08-26 Sureshkumar T ([email protected])
* OdbcDataReader.cs - Date & DateTime GetValue fixed.
			      GetBytes ordinal parameter passing fixed for BINARY in GetValue.

svn path=/trunk/mcs/; revision=32877
2004-08-26 13:15:16 +00:00
Sureshkumar T dc95f1eefb 2004-08-20 Sureshkumar T ([email protected])
* OdbcConnection.cs - correct handles are passed to OdbcError exception to trap the correct error

svn path=/trunk/mcs/; revision=32564
2004-08-20 10:57:52 +00:00
Umadevi S 18599ae4de 2004-08-04 Umadevi S ([email protected])
* OdbcDataReader.cs - Fixed bug 61832 - Column names were not filled, due to which name based lookup of columns failed.

svn path=/trunk/mcs/; revision=31855
2004-08-04 09:50:50 +00:00
Umadevi S 4a34266eaa 2004-08-04 Umadevi S ([email protected])
* OdbcDataReader.cs - Fixed bug 61405 - Handling smallint column type.

svn path=/trunk/mcs/; revision=31846
2004-08-04 08:01:44 +00:00
Sureshkumar T f833b9e06b 2004-07-30 Sureshkumar T ([email protected])
* OdbcCommand.cs: ExecuteNonQuery Closed statement handle to fix memory leak
        * OdbcDataReader.cs: Closed statement handle to fix memory leak
			     Removed SQLState login in GetBytes coz OdbcError provides the same.

svn path=/trunk/mcs/; revision=31649
2004-07-30 11:35:08 +00:00
Umadevi S eb1711a918 2004-07-29 Umadevi S ([email protected])
* OdbcCommand.cs - Fixed bug 62046. ExecuteNonQuery implemented correctly

svn path=/trunk/mcs/; revision=31596
2004-07-29 06:14:03 +00:00
Umadevi S ca6eab23b1 2004-07-28 Umadevi S ([email protected])
* OdbcParameter.cs - fixed bug 61968. String values passed with quotes

svn path=/trunk/mcs/; revision=31534
2004-07-28 08:16:02 +00:00
Umadevi S 500a09486f 2004-07-07 Umadevi S ([email protected])
* OdbcConnection.cs - Allowed Close to be called multiple times
                            - Implementation of Dispose method
        (patch submitted by Sebastien Robitaille), corrected a typo

svn path=/trunk/mcs/; revision=30826
2004-07-07 09:19:12 +00:00
Umadevi S 493228944f 2004-07-07 Umadevi S ([email protected])
* OdbcConnection.cs - Allowed Close to be called multiple times
                            - Implementation of Dispose method
	(patch submitted by Sebastien Robitaille)

svn path=/trunk/mcs/; revision=30825
2004-07-07 09:15:52 +00:00