.NET只支持oracle数据库包中的procedure,不支持function,所以直接调用是不行的,但你可以建立一个procedure,在procedure中调用function就行了.

解决方案 »

  1.   

    函数不能在设计分析其中使用,可以直接在程序设计中用
    string strCommand;
    strCommand="select order_no,inventory_part_api.get_description(contract,part_no),part_no from SHOP_ORD where inventory_part_api.get_description(contract,part_no) like '%喜之郎25%果冻%'"; OleDbConnection con=new OleDbConnection("Provider=MSDAORA.1;Password=pphz;User ID=IFSAPP;Data Source=prod");
    con.Open();
    OleDbDataAdapter adapter=new OleDbDataAdapter(strCommand,con); DataSet dataset = new DataSet(); adapter.Fill(dataset);
    this.DataGrid1.DataSource=dataset;
    DataGrid1.DataBind();
    con.Close();