Help in calling Oracle Package from aspx page

G

Garfield

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,562
Members
45,038
Latest member
OrderProperKetocapsules

Latest Threads

Top