给你一个 ADO.NET 的参考:
http://www.zdnet.com.cn/developer/tech/story/0,2000081602,39137928,00.htm

解决方案 »

  1.   

    最后执行cmd.executereader()时就出错了,为什么?
    我是参考oleDB连接sql做的,是不是调用oracle的存储过程和调用sql中的存储过程有什么不同?望指教!!!!!!!!!!!
      

  2.   

    给个例子 
     SqlCommand sampleCMD = new SqlCommand("Package.ProName", myConn);
    sampleCMD.CommandType = CommandType.StoredProcedure;
    ...myC
    Dim myConnection As New OracleConnection(connectstring)
            myConnection.Open()
            Dim myCommand As New OracleCommand()
            myCommand.Connection = myConnection
            myCommand.CommandType = CommandType.StoredProcedure        myCommand.CommandText = "packagename.procedurename"        myCommand.Parameters.Add("CURSORname", OracleType.Cursor).Direction = ParameterDirection.Output        Dim myReader As OracleDataReader
            myReader = myCommand.ExecuteReader()        ListBox2.DataSource = myReader
            ListBox2.DataTextField = "PROJECTNAME"
            ListBox2.DataBind()
            ListBox2.SelectedIndex = 0        myReader.Close()
            myConnection.Close()
            myReader = Nothing
            myConnection = Nothing