C#: Oracle Data Type Equivalence with OracleDbType

前端 未结 5 2330
广开言路
广开言路 2020-12-01 05:34

Situation:

I am creating an app in C# that uses Oracle.DataAccess.Client (11g) to do certain operations on a Oracle database with stored procedures. I am awa

5条回答
  •  眼角桃花
    2020-12-01 06:14

    Check APC's links out, they are what you are looking for : the mapping is quite straightforward according to the name of the enumeration.

    But as you began to notice, there is something tricky about integers. Here is my mapping :

    • Int16 : NUMBER(5).
    • Int32 : NUMBER(10).
    • Int64 : NUMBER(19).

    The thing is that if you call GetInt64 on a NUMBER(38) column, you will get an exception even if the value is in the correct range...

提交回复
热议问题