Skip to Main Content

ODP.NET

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Fill Dataset/DataReader (C#) from StoredProcedure??

520094Jan 13 2007 — edited Jan 15 2007
Dear ODP Friends,



I’ve used following Stored Procedure.
I’m using Dot Net(C#)I and want to Fill Dataset or Data reader.
Could some one be able to through the lights how to fill dataset or datareader from a storedprocedure.
Any idea would be valuable.

/*************************************************SQL,PL/SQL********************************************/
SQL> conn
Enter user-name: scott
Enter password: *****
Connected.
SQL> create or replace PROCEDURE Test
(
or_cursr out sys_refcursor
)
as
BEGIN
OPEN or_cursr FOR
SELECT * FROM Scott.Emp Where Empno=7788;
END Test;
/

Procedure created.

/**********************IN DOT NET(C#)*********************************/
Try
{
con.Open();
OracleCommand cmd = new OracleCommand("Test", con);
cmd.CommandType = CommandType.StoredProcedure;

DataSet ds = new DataSet();
OracleDataAdapter adptr=new OracleDataAdapter();
adptr.SelectCommand = cmd;
adptr.Fill(ds); //Here Error found.
MessageBox.Show(“Data set filled.”);
}
catch(OracleException ex){ MessageBox.Show(“Oracle Error\n”+ex.Message); }
catch (Exception ex) { MessageBox.Show(“General App Error”); }
finally
{
con.Close()
}

//**********************//
Error is :

Ora-06550: line 1, column 7:
PLS-00306: wrong Number or types of argument in call to ‘TESt’
Ora-06550: line 1, column 7:

Pl/Sql: statement ignored


Khurram

Comments

riedelme
hek123 wrote:
I've an urgent problem with a customer in Slovenia. Their national characters show on our webpages as an inverted question mark.

Their core system works ok - and so the database - at least when it comes to NLS.

Is there any settings in Mod/Plsql - that could influence this?

I've posted this question in the Globalization forum - without any answers....

Thanx
Sorry I don't have a direct answer, but maybe some ideas can help spark other ideas.

The inverted question mark appears in SQL*PLUS too when special characters cannot be rendered. Could this be a character set issue - are you using the correct character set to render the special characters? If the character set is correct could this be a conversion issue?
1 - 1
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Feb 12 2007
Added on Jan 13 2007
3 comments
1,444 views