When connecting Oracle using. NET 2.0:
In the 1.1 era, both using system. Data. oracleclient and. NET 2.0 were improved to dbprovider (system. Data. Common,
It looks pretty, but it's okay when I use the Oracle stored procedure to return the result set.
Dbtype does not support the cursor type ?! I checked the information for half a day and no results were found.
If there is no way to return to system. Data. oracleclient
. NET Framework data provider for Oracle
Oracle type |
. NET Framework type |
. NET Framework typed accessor |
Oracletype typed accessor |
Bfile |
Byte [] |
Getbytes () |
Getoraclebfile () |
Blob |
Byte [] |
Getbytes () |
Getoraclelob () |
Char |
String Char [] |
Getstring () Getchars () |
Getoraclestring () |
Clob |
String Char [] |
Getstring () Getchars () |
Getoraclelob () |
Date |
Datetime |
Getdatetime () |
Getoracledatetime () |
Float |
Decimal |
Getdecimal () |
Getoraclenumber ()** |
Integer |
Decimal |
Getdecimal () |
Getoraclenumber ()** |
Interval year to month * |
Int32 |
Getint32 () |
Getoraclemonthspan () |
Interval day to second * |
Timespan |
Gettimespan () |
Getoracletimespan () |
Long |
String Char [] |
Getstring () Getchars () |
Getoraclestring () |
Long raw |
Byte [] |
Getbytes () |
Getoraclebinary () |
Nchar |
String Char [] |
Getstring () Getchars () |
Getoraclestring () |
Nclob |
String Char [] |
Getstring () Getchars () |
Getoraclelob () |
Number |
Decimal |
Getdecimal () |
Getoraclenumber ()** |
Nvarchar2 |
String Char [] |
Getstring () Getchars () |
Getoraclestring () |
Raw |
Byte [] |
Getbytes () |
Getoraclebinary () |
Ref cursor |
|
|
|
Rowid |
String Char [] |
Getstring () Getchars () |
Getoraclestring () |
Timestamp * |
Datetime |
Getdatetime () |
Getoracledatetime () |
Timestamp with local time zone * |
Datetime |
Getdatetime () |
Getoracledatetime () |
Timestamp with time zone * |
Datetime |
Getdatetime () |
Getoracledatetime () |
Unsigned integer |
Decimal |
Getdecimal () |
Getoraclenumber ()** |
Varchar2 |
String Char [] |
Getstring () Getchars () |
Getoraclestring () |
The problem is finally solved in the following way:
Dbparameter Param = dpfprovider. createparameter ();
If (sourcecolumn = oracle_ref_cursor)
{
Oracleparameter op = new oracleparameter ();
Op. oracletype = oracletype. cursor;
Param = op;
}
Although it looks a little nondescribable, it can run and supports multiple Oracle ref cursor