C#:Oracle数据类型等效与OracleDbType [英] C#: Oracle Data Type Equivalence with OracleDbType

查看:4473
本文介绍了C#:Oracle数据类型等效与OracleDbType的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我创建在C#中使用Oracle.DataAccess.Client(11克)做存储过程的Oracle数据库上的某些操作的应用程序。据我所知,有一定的枚举(OracleDbType)包含Oracle数据类型的,但我不知道使用某些类型的其中之一。

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 aware that there is a certain enum (OracleDbType) that contains the Oracle data types, but I am not sure which one to use for certain types.


  • 什么是等价的的Oracle PL / SQL数据
    键入
    在每个枚举类型
    OracleDbType枚举

有三种类型的整数

(Int16的,的Int32,Int64的)在OracleDbType ......怎么知道
使用哪一个或者是他们所有的

想与我们合作?

There are three types of integer
(Int16, Int32, Int64) in the OracleDbType... how to know which one to use or are they all
suppose to work?


推荐答案

在OracleDbType枚举值在文档中定义。读<一个href=\"http://download.oracle.com/docs/cd/B19306%5F01/win.102/b14307/OracleDbTypeEnumerationType.htm\">the ODP为.NET开发人员指南。

The values of the OracleDbType Enumeration are defined in the documentation. Read the ODP for .NET Developer's Guide.

至于Int16的,的Int32和Int64的之间做出选择,他们都应该工作。选择符合你的.Net变量的预期大小之一:-32768到32767之间的Int16为值的Int32为更大的东西-2147483648和2147483647,以及Int64的之间的值。似乎有与转换整型和PL / SQL数据类型的一些连环画。检查本博客文章由马克·威廉姆斯

With regards to choosing between Int16, Int32 and Int64, they are all supposed to work. Choose the one which matches the expected size of your .Net variable: Int16 for values between -32768 and 32767, Int32 for values between -2147483648 and 2147483647, and Int64 for anything larger. There appear to be some funnies relating to converting Ints and PL/SQL data types. Check this blog post by Mark Williams.

这篇关于C#:Oracle数据类型等效与OracleDbType的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆