Users have been complaining about strange errors arising when using the OracleClient classes.
I have tracked it down to the OciDefineHandle and OciDefineByPos calls, and OracleParameter
handling of amanged objects by unmanaged code. Currently two of the parameters passed to the
above OCI call are short variables. They are passed as "ref" fields as Oracle uses their
address to put size and indicator data once the data is fetched. However, being defined as
short means that they are eligible for being moved during garbage collection. Thus if that
field is moved between the OciDefineByPos call and the fetch of the data then what Oracle is
pointing to may no longer be variable. I'm thinking it may be better to define these fields as
IntPtr and allocate them and retrieve their values via Marshal.ReadInt16. As for OracleParameter,
it uses a managed object "indicator" that is also used in a similar way. This reference is replaced
by a IntPtr and a get/set method to access the contents.
This is a scripted conversion of mixed line-ending files to LF-only or CRLF-only
based on which patch is smaller. I used a threshold of upto a quarter of the
lines to determine whether to keep the patch or not.
This set of .gitattributes was automatically generated from the list of files
that GIT tried to normalize when I enabled automatic EOL conversion.
With this set of attributes, we prevent automated EOL conversion on files that
we know will cause trouble down the road.
* System.Data.OracleClient/OracleParameter.cs: add
parameter support for LONG RAW and RAW data types
* System.Data.OracleClient.Oci/OciDefineHandle.cs: flush
extra assigning of types
svn path=/trunk/mcs/; revision=146885
** Fixes#321718
* OciCalls.cs: Add stub for OCILobCharSetForm to get the charset
form associated with a CLOB/NCLOB.
* OciLobLocator.cs: Add Environment handle property that is
required to call OCILobCharSetForm and pass the output value to
OCILobRead.
* OciDefineHandler.cs: Update Environment property of
OCILobLocator.
svn path=/trunk/mcs/; revision=144980
* Test/TestOracleClient.cs: add tests
for TIMESTAMP Input, Output, InputOutput, Return
parameters and handle DBNull.Value too
* System.Data.OracleClient/OracleCommandBuilder.cs
* System.Data.OracleClient/OracleDataAdapter.cs: cleanup warnings
for default profile
* System.Data.OracleClient.Oci/OciDateTimeDescriptor.cs
* System.Data.OracleClient/OracleParameter.cs: fix parameters
for TIMESTAMP Input, Output, InputOutput, Return
parameters and handle DBNUll.Value via indicator = -1
However, TIMESTAMP WITH TIMEZONE and TIMESTAMP WITH LOCAL TIMESTAMP
not tested.
svn path=/trunk/mcs/; revision=113244
* System.Data.OracleClient/OracleConnection.cs: add stubs
for method GetSchema which is part of NET_2_0, and clean up warnings
* System.Data.OracleClient/OracleCommand.cs
* ystem.Data.OracleClient/OracleParameter.cs
* System.Data.OracleClient/OracleBFile.cs
* System.Data.OracleClient.Oci/OciHandle.cs: clean up warnings
* System.Data.OracleClient.Oci/OciDescriptorHandle.cs
* System.Data.OracleClient.Oci/OciDefineHandle.cs: make methods internal
svn path=/trunk/mcs/; revision=112925
* Test/TestOracleClient.cs: fix typo,
enable more test,
Tests pass for parameters for Character, Number, and Date
for Input, Output, InputOutput, and ReturnValue and
situations when any of these could be DBNull.Value
* System.Data.OracleClient/OracleParameter.cs: fix
handling of parameters for character, number, and date
types. Need to redo all the other types based on the above.
* System.Data.OracleClient.Oci/OciDefineHandle.cs: rename private
method DefineLong to DefineLongVarChar
svn path=/trunk/mcs/; revision=112641
* Test/TestOracleClient.cs: get oracle connected tests
going again
* System.Data.OracleClient.Oci/OciDefineHandle.cs
* System.Data.OracleClient/OracleDataReader.cs
* System.Data.OracleClient/OracleCommand.cs: fix character
field value for a reader that was retrieved from a REF CURSOR.
It was failing due to OCI_INVALID_HANDLE - resolve the error
by passing a connection object which has a valid environment
handle.
* System.Data.OracleClient.Oci/OciCalls.cs: correct
call to OCIDefineByPos
* System.Data.OracleClient/OracleParameter.cs: better way to
determine if the input value Is Null instead of using reflection.
Flush - Re-arraning how variables are being bound.
* System.Data.OracleClient/OciGlue.cs: add function
to convert OCI Return / Error Status Code to a String Description
* System.Data.OracleClient.Oci/OciErrorHandle.cs: better
error handling
svn path=/trunk/mcs/; revision=112419
* System.Data.OracleClient/OracleCommand.cs: removed AssertNoDataReader
because oracle allows multiple result sets and has since .NET 1.0,
fix bug where REF CURSOR would not work for ExecuteReader or
filling a DataSet via an OracleDataAdapter. The REF CURSOR is used to
populate the DataSet.
* System.Data.OracleClient/OracleDataReader.cs: fix for getting
next result set; implement NET_2_0 methods
GetProviderSpecificFieldType,
GetProviderSpecificValuee,
GetProviderSpecificValue; and validate the reader is open
before allowing a Read or NextResult, otherwise, throw
an InvalidOperationException
* System.Data.OracleClient/OracleParameter.cs: fix for
getting one or more REF CURSOR out parameters if
ExecuteReader was called.
* System.Data.OracleClient.Oci/OciErrorHandle.cs
* System.Data.OracleClient.Oci/OciHandle.cs: add addiional method
for getting error, such as, INVALID_HANDLE being passed to OCI
svn path=/trunk/mcs/; revision=112250
* System.Data.OracleClient/OracleParameter.cs
* System.Data.OracleClient.Oci/OciStatementHandle.cs
* System.Data.OracleClient.Oci/OciDefineHandle.cs: fix bug
for GetOracleLob in OracleDataReader that was created
via a REF CURSOR. Bug occurred because the cursor when created
did not have a ServiceContext - this was solved by passing
the connection in which did. Fixes bug#350408. In OracleParameter, also
show the data type that is not implemented.
* Test/testblob.cs
* Test/TestOracleClient.cs: updated tests
* Test/refcursortest.cs: added ref cursor test with blob
svn path=/trunk/mcs/; revision=111595
* System.Data.OracleClient/OracleCommand.cs
* System.Data.OracleClient.Oci/OciHandle.cs
* System.Data.OracleClient.Oci/OciRowIdDescriptor.cs: fix
bug 378470 by fixing method ExecuteOracleNonQuery
by getting the Universal ROWID and
returning it as an output parameter OracleString.
This will only work for Oracle 9i clients and above.
svn path=/trunk/mcs/; revision=111525
* System.Data.OracleClient.Oci/OciStatementHandle.cs : Get StatementType as a ushort value.
* System.Data.OracleClient.Oci/OciParameterDescriptor.cs : Get DataType as a ushort value.
Fixes bug #71318.
svn path=/trunk/mcs/; revision=57762
* System.Data.OracleClient/OracleConnectionPoolManager.cs
* System.Data.OracleClient/OracleConnectionPool.cs
* System.Data.OracleClient/OracleConnection.cs: for connection pooling, need to
dispose of any connection pools properly otherwise a SEGSIGV may happen trying
to detach from the server during finalization at exit of app
* System.Data.OracleClient/OracleDataReader.cs: need to make sure statement and command
exists during dispose because they are set to null when closed
svn path=/trunk/mcs/; revision=54588
* System.Data.OracleClient/OracleParameter.cs: free
unmanaged resources after update of values
2005-12-13 Daniel Morgan <[email protected]>
* System.Data.OracleClient.Oci/OciErrorHandle.cs patch
from "Hubert FONGARNAND" <[email protected]>
- fix error handling for non-English locales. Bug# 76623.
2005-12-13 Daniel Morgan <[email protected]>
* System.Data.OracleClient/OracleParameter.cs: patch
from "Hubert FONGARNAND" <[email protected]>
- fix Timestamp when filling a DataSet. Bug# 76437.
2005-12-13 Daniel Morgan <[email protected]>
* System.Data.OracleClient/OracleParameter.cs: patch
from "Hubert FONGARNAND" <[email protected]>
- problems with OracleClob as input parameters
(when the input parameter is an OracleString,
mono crashes with a invalidcastexception)
- problems with OracleDateTime.Null, OracleString.Null
as input parameters (it works with DBNull.Value,
but it fails with those parameters)
svn path=/trunk/mcs/; revision=54271
* System.Data.OracleClient/OracleCommandBuilder.cs: update
based on changes Suresh did to OdbcCommandBuilder, SqlCommandBuilder,
and DbDataAdapter
* System.Data.OracleClient/OracleParameter.cs
* System.Data.OracleClient.Oci/OciHandle.cs
* System.Data.OracleClient.Oci/OciCalls.cs
* System.Data.OracleClient.Oci/OciDataType.cs
* System.Data.OracleClient.Oci/OciParameterDescriptor.cs
* System.Data.OracleClient.Oci/OciStatementHandle.cs
* System.Data.OracleClient.Oci/OciDefineHandle.cs: with help
from Hubert FONGARNAND <[email protected]>
implement TIMESTAMP support via OciDateTime descriptor
* System.Data.OracleClient.dll.sources: add
OciDateTimeDescriptor.cs to build
* System.Data.OracleClient.Oci/OciDateTimeDescriptor.cs: add new
file to support Oracle TIMESTAMP using OciDateTime descriptor
svn path=/trunk/mcs/; revision=48254
* System.Data.OracleClient/OracleCommand.cs: support
CommandBehavior of SchemaOnly
* System.Data.OracleClient/OracleCommandBuilder.cs:
implement OracleCommandBuilder. Does not work yet.
* System.Data.OracleClient/OracleDataReader.cs:
implement CommandBehavior of KeyInfo which is required
for OracleCommandBuilder. Correct data retreived via
GetSchemaTable()
* System.Data.OracleClient.Oci/OciParameterDescriptor.cs: add
method to convert a OciDataType enum to OracleDataType enum
* System.Data.OracleClient.Oci/OciStatementHandle.cs: allow
execute of DescribeOnly to support CommandBehavior.SchemaOnly
* Test/OracleAdapterTest.cs: add file for adapter tests
svn path=/trunk/mcs/; revision=47156
* System.Data.OracleClient/OracleParameter.cs
* System.Data.OracleClient/OracleCommand.cs
* System.Data.OracleClient/OracleDataReader.cs: support
Output parameters. Return and InputOutput are TODO. Input
already supported. TODO for handling NULL indicator on Output params.
* System.Data.OracleClient/OracleConnection.cs: remove
compile warning
* Test/TestOracleClient.cs: add tests for out parameters
svn path=/trunk/mcs/; revision=47076
* System.Data.OracleClient/OracleDateTime.cs: modified -
added functions for converting the date format strings between
OracleDateTime and DateTime based on
the NLS_DATE_FORMAT on the Oracle server
* System.Data.OracleClient/OracleConnection.cs: implement
internal function GetNlsInfo to get NLS info from the Oracle server
for the session or environment. Also, implemented function
GetSessionNlsDateFormat to get Oracle's NLS_DATE_FORMAT string
* System.Data.OracleClient/OracleParameter.cs: for input parameters,
fixed setting the parameter value to DBNull.Value and fixed the
setting of a DateTime or OracleDateTime. Tried to fix CLOBs/BLOBs, but
it is still a TODO.
* Test/TestOracleClient.cs: updated the parameters test
* System.Data.OracleClient.Oci/OciHandle.cs: implement
internal function SetAttributeString
* System.Data.OracleClient.Oci/OciCalls.cs: add DllImport
OCIBindByNameBytes so byte array can be passed instead of IntPtr
for the value, add DllImport OCIDateTimeFromText,
and added DllImport for OCINlsGetInfo to get NLS info,
such as, NLS_DATE_FORMAT
* System.Data.OracleClient.Oci/OciAttributeType.cs: added
attribute for date format (not used)
* System.Data.OracleClient.Oci/OciNlsServiceType.cs: added new file
for an enum to hold NLS Service types which is to be used with GetNlsInfo()
in OracleConnection
* System.Data.OracleClient.dll.sources: added OciNlsServiceType.cs to
the build
svn path=/trunk/mcs/; revision=40926
* System.Data.OracleClient/OracleDataReader.cs: add LONG
to GetOracleValue to return an OracleString
* System.Data.OracleClient.Oci/OciDefineHandle.cs: add
LONG VARCHAR support. See DefineLong ()
for LAMESPEC about OCI
* Test/TestOracleClient.cs: add LONG to Oracle tests
svn path=/trunk/mcs/; revision=40229
* Assembly/AssemblyInfo.cs: updated copyright
* System.Data.OracleClient/OracleCommand.cs: add
connection string parameter "Server" and
removed "Database" to match .NET
* System.Data.OracleClient/OracleLob.cs: handle
BLOBs and CLOBs that are not null, but are empty
* System.Data.OracleClient/OracleCommand.cs: started
implementing Clone and ExecuteOracleScalar
* System.Data.OracleClient/OracleDataReader.cs: modified
- ms.net has GetDataTypeName return data types upper case
- implement GetFieldType
- implement GetOracleValues, GetOracleValue,
GetOracleDateTime, GetOracleNumber, GetOracleString
- modified GetOracleLob based on internal change
- fix GetSchemaTable to return the correct "DataType"
instead of always being System.String
- GetValue should return Blobs as a byte array and Clobs
as a string
- Test/TestOracleClient.cs: updated Mono Oracle Tests
- System.Data.OracleClient.Oci/OciCalls.cs: update
DllImports for data type, actual data size, and iters
* System.Data.OracleClient.Oci/OciDefineHandle.cs: modified
- added properties for precision and field type
- if ROWID is specified in a SELECT statement, handle
the data type of OciDataType.RowIdDescriptor by just
treating it as 10 byte string
- do not free a HGlobal handle for a LOB since they do
not get a HGlobal created for them
- GetValue should return an OracleLob for BLOBs and CLOBs
* System.Data.OracleClient.Oci/OciDataType.cs: make enum
OciDataType to be uint
* System.Data.OracleClient.Oci/OciParameterDescriptor.cs:
- add function to convert Oracle's data type name
to .net data type name
* System.Data.OracleClient.Oci/OciRowIdDescriptor.cs: flush
svn path=/trunk/mcs/; revision=38419
* System.Data.OracleClient/OracleCommandBuilder.cs:
Fixed namespace.
* System.Data.OracleClient.dll.sources:
Added OracleCommandBuilder.cs.
2004-05-26 Joerg Rosenkranz <[email protected]>
* System.Data.OracleClient.Oci/OciDefineHandle.cs:
Merged in a fix send by Rogerio Pereira Araujo
<[email protected]>: Fixed a bug with NUMBER data type
when no parameter is passed to OracleCommand.
svn path=/trunk/mcs/; revision=28333
* System.Data.OracleClient/OracleCommand.cs:
* System.Data.OracleClient/OracleDataReader.cs:
* System.Data.OracleClient.Oci/OciStatementHandle.cs: patch by Eduard
Nesiba that implements autocommit behavior for non query statement
which is out of transaction. In previous implementation changed rows
stayed locked until client disconnect and hasRows proper settings.
svn path=/trunk/mcs/; revision=28019