在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
1. 水晶易表不能识别WS接口返回的DataTable或DataSet数据类型,会提示“无法加载URL” 3. C#调用Oracle的Package,并返回数据列表 2. 经查证,可以接受string类型的,如果需要返回数据列表,那么需要借助数组来返回,代码实现如下: 复制代码 代码如下: public WeekSale_Table GetData(string skc1, string skc2, string week1, string week2, string week3, string week4) { try { //C#调用Oracle的包,返回数据列表 OracleConnection orcn = new OracleConnection(ConfigurationManager.AppSettings["SAPBI"].ToString()); OracleCommand cmd = new OracleCommand("pkg_cx_Productlifecycle.skcweeksale", orcn); cmd.CommandType = CommandType.StoredProcedure; OracleParameter ip0 = new OracleParameter("skc1", OracleType.VarChar); OracleParameter ip1 = new OracleParameter("skc2", OracleType.VarChar); OracleParameter ip2 = new OracleParameter("week1", OracleType.VarChar); OracleParameter ip3 = new OracleParameter("week2", OracleType.VarChar); OracleParameter ip4 = new OracleParameter("week3", OracleType.VarChar); OracleParameter ip5 = new OracleParameter("week4", OracleType.VarChar); ip0.Value = skc1; cmd.Parameters.Add(ip0); OracleParameter p1 = new OracleParameter("p_rc", OracleType.Cursor); OracleDataAdapter command = new OracleDataAdapter(cmd); 复制代码 代码如下: //定义Row,一行 public class WeekSale_Row { public string WEEKS; public string SKC1; public string SKC2; public string FCALCSUMS1; public string FCALCSUMS2; public string NUMS1; public string NUMS2; public string DISCOUNT1; public string DISCOUNT2; public string WEEK; } //定义Table |
请发表评论