.NET调用Oracle存储过程,使用数组类型的参数(如ArrayList)
日期:2007年9月7日 作者: 查看:[大字体 中字体 小字体]-
Error Handling for Array Binding
If an error occurs during an array bind execution, it can be difficult to determine which element in the Value property caused the error. ODP.NET provides a way to determine the row where the error occurred, making it easier to find the element in the row that caused the error.When an OracleException object is thrown during an array bind execution, the OracleErrorCollection object contains one or more OracleError objects. Each of these OracleError objects represents an individual error that occurred during the execution, and contains a provider-specific property, ArrayBindIndex, which indicates the row number at which the error occurred.
The following example demonstrates error handling for array binding:
/* Database Setup
connect scott/tiger@oracle
drop table depttest;
create table depttest(deptno number(2));
*/
// C#
using System;
using System.Data;
using Oracle.DataAccess.Client;
class ArrayBindExceptionSample
{
static void Main()
{
OracleConnection con = new OracleConnection();
con.ConnectionString = "User Id=scott;Password=tiger;Data Source=oracle;";
con.Open();
OracleCommand cmd = new OracleCommand();
// Start a transaction
OracleTransaction txn = con.BeginTransaction(IsolationLevel.ReadCommitted);
try
{
int[] myArrayDeptNo = new int[3] { 10, 200000, 30 };
// int[] myArrayDeptNo = new int[3]{ 10,20,30};
// Set the command text on an OracleCommand object - 上一页 [1] [2] [3] [4] [5] [6] [7] 下一页
-
- .NET调用Oracle存储过程,使用数组类型的参数(如ArrayList) 相关文章:
- ·Excel XP函数实用教程精华集
- ·ASP函数库
- ·轻松了解MySQL数据库中的CONVERT()
- ·在Excel中将文本转换为数字的七种方法
- ·关于oracle日期函数的介绍和使用
- ·图片保存到数据库和从数据库读取图片并显示(c#)
- ·数据库连接字符串大全
- ·ASP.NET中数据库的操作初步----增加、删除、修改
- ·UDT协议-基于UDP的可靠数据传输协议
- ·oracle函数之常见单行字符串函数
- .NET调用Oracle存储过程,使用数组类型的参数(如ArrayList) 相关软件
- ·DataExplore数据恢复大师 V2.5
- ·数据结构与算法
- ·我有数备份专家(免引导盘GHOST) V1.6.1 绿色版
- ·小学数学伴侣 V5.0
- ·MathType 数学公式编辑器 V5.2 汉化版
- ·P8数字娱乐传播平台 V1.0.1.55
- ·数字小键盘指法练习 V1.2
- ·初中数学课件大全 V1.0
- ·数谜(Kakuro Quest)
- ·数码宝贝2
- 特别声明:本站除部分特别声明禁止转载的专稿外的其他文章可以自由转载,但请务必注明出处和原始作
- 者.文章版权归文章原始作者所有.对于被本站转载文章的个人和网站,我们表示深深的谢意。如果本站转
- 载的文章有版权问题请联系编辑人员,我们尽快予以更正. 转载请注明来源:http://www.hackhome.com
上一篇:ASP.NET之上传文件管理策略
精品推荐
热点TOP10
- ·C#编写的windows计算器-源代码
- ·用C#写计算器程序
- ·c#操作word表格
- ·AspNetPager分页控件--使用方法
- ·C#導出Excel源碼
- ·ASP.NET技巧:GridView控件自定义分页详解
- ·图片保存到数据库和从数据库读取图片并显示(c#)
- ·ASP.NET购物车的实现及结算处理
- ·客户端回调实现gridView无刷新分页
- ·ASP.NET中数据库的操作初步----增加、删除、修改
- ·C#获取本地计算机名IP,Mac地址
- ·ASP.NET2.0下含有DropDownList的GridView编辑、删除的完整例子!
- ·VS 2008和.NET 3.5 Beta2新特性介绍
- ·asp.net(C#)海量数据表高效率分页算法(易懂,不使用存储过程)
- ·Asp.net文件上传操作
- ·通常C#面试题
- ·身份证号码15位升18位(C#)
- ·ASP.NET无限级分类的非递归实现(存储过程版)
- ·asp.net开发wap程序必备:识别来访手机品牌型号
- ·ASP.NET一个最简单的会员登陆代码
特别推荐
- ·ASP.NET之上传文件管理策略
- ·ASP.NET程序中常用的三十三种代码
- ·ASP.Net中保护自定义的服务器控件
- ·C#设计的一个向导程序(Wizard)框架
- ·.net中即时消息发送的实现……
- ·ASP.NET动态创建控件之绝境求生
- ·.NET调用Oracle存储过程,使用数组类型的参数(如ArrayList)
- ·C#中水晶按钮的程序生成
- ·日历函数单元
- ·图片保存到数据库和从数据库读取图片并显示(c#)
- ·ASP.NET2.0下含有DropDownList的GridView编辑、删除的完整例子!
- ·C#中四种进程或线程同步互斥的控制方法
- ·[C#]解决读写包含汉字的txt文件时乱码的问题
- ·AspNetPager分页控件--使用方法
- ·六步使用ICallbackEventHandler实现无刷新回调
- ·从 ASP.NET 服务器控件插入客户端脚本
- ·C#導出Excel源碼
- ·Asp.net直接保存文件到客户端
- ·如何在上传的图片上写字
- ·Access 通用数据访问类(asp.net 2.0 c#)
