Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Problems Calling Oracle Package from aspx page
Hi,
I'm, trying to call a package from my page to populate a datagrid. I'm using an example from the web, but I can't get it to work.
Here is my code:
code in the aspx page:
...
OracleConnection cnnOracle = new OracleConnection(ConfigurationSettings.AppSettings["ConnectionString"]);
cnnOracle.Open();
OracleCommand oraCmd = new OracleCommand("{call PACKPERSON.AllPerson({resultset 10,ssn,fname,lname})}",cnnOracle);
oraCmd.CommandType = CommandType.StoredProcedure;
DataSet dstPerson = new DataSet();
OracleDataAdapter adpPerson = new OracleDataAdapter(oraCmd);
adpPerson.Fill(dstPerson);
this.DataGrid1.DataSource= dstPerson;
this.DataGrid1.DataBind();
...
When I run my application I get the following error:
ORA-06550: line 1, column 7: PLS-00103: Encountered the symbol "{" when expecting one of the following: begin case declare exit for goto if loop mod null pragma raise return select update while with <an identifier> <a double-quoted delimited-identifier> <a bind variable> << close current delete fetch lock insert open rollback savepoint set sql execute commit forall merge <a single-quoted SQL string> pipe
Any suggestion are welcome.
Thanks
Garfield
Received on Wed Mar 03 2004 - 18:51:27 CST