请教用C#向Oracle存储过程传递数组参数? 35
自定义类型:createorreplaceTYPECOLASVARRAY(100)OFvarchar2(100);存储过程:createorreplacePROCEDUR...
自定义类型:create or replace TYPE COL AS VARRAY(100) OF varchar2(100);
存储过程:create or replacePROCEDURE CreateModelTable(tableName VARCHAR2,colName COL,colType COL,sqlflag OUT VARCHAR2)
C#传参语句:
OracleParameter pColName = new OracleParameter(@"colName", Oracle.DataAccess.Client.OracleDbType.Varchar2);
pColName.Direction = System.Data.ParameterDirection.Input;
pColName.Value = nameStr; // string[]类型
pColName.CollectionType = OracleCollectionType.PLSQLAssociativeArray; 展开
存储过程:create or replacePROCEDURE CreateModelTable(tableName VARCHAR2,colName COL,colType COL,sqlflag OUT VARCHAR2)
C#传参语句:
OracleParameter pColName = new OracleParameter(@"colName", Oracle.DataAccess.Client.OracleDbType.Varchar2);
pColName.Direction = System.Data.ParameterDirection.Input;
pColName.Value = nameStr; // string[]类型
pColName.CollectionType = OracleCollectionType.PLSQLAssociativeArray; 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询