• λ我爱Aspx >> C#.Net >> .NET调用Oracle存储过程,使用数组类型的参数(如ArrayList)
  • .NET调用Oracle存储过程,使用数组类型的参数(如ArrayList)

  • :aspxer  Դ:5iaspx  :2007-7-30 6:09:55  ؼ:.net
  • 今天一个项目组的朋友问及:如何在.NET中调用Oracle的存储过程,并以数组作为参数输入。

    Oracle的PL/SQL非常强大,支持定长数组和变长数组,支持任何自定义数据类型。通过阅读ODP的文档,发现Oracle是完全支持将数组作为存储过程参数的。下面给出文档信息。

    Array Binding

    The array bind feature enables applications to bind arrays of a type using the OracleParameter class. Using the array bind feature, an application can insert multiple rows into a table in a single database round-trip.

    The following example inserts three rows into the Dept table with a single database round-trip. The OracleCommand ArrayBindCount property defines the number of elements of the array to use when executing the statement.

    // C#

    using System;

    using System.Data;

    using Oracle.DataAccess.Client;

    class ArrayBindSample

    {

    static void Main()

    {

    OracleConnection con = new OracleConnection();

    con.ConnectionString = "User Id=scott;Password=tiger;Data Source=oracle;";

    Ҷƪл˵?
  • һƪ系统解答:引导或系统启动驱动程序无法加载
    һƪmscorwks.dll在.Net中的地位以及在.Net代码保护方面的应用