DataSet Wizard - Cannot derive Parameters for stored procedure

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
marc.vanhoecke
Posts: 11
Joined: Mon 27 Aug 2007 08:24

DataSet Wizard - Cannot derive Parameters for stored procedure

Post by marc.vanhoecke » Mon 27 Aug 2007 08:46

Hi,

I'm using OraDirect.NET version 4 in VS2005 on Windows Vista. I have a problem with the DataSet Wizard.
I created an oracle function with the following definition:
FUNCTION report_procedures.ka1 (
datefrom IN DATE,
dateto IN DATE,
gb IN INTEGER,
st IN INTEGER,
kst IN INTEGER,
gw IN INTEGER
) RETURN curs;

curs is of type REF CURSOR.

In the DataSet Wizard I can see this function next to all the tables of the Schema I logged on to. I select it, the checkbox 'Share Connection' is set and the Data Source Type is 'Table Adapters'. When I press next, I always get the error "Cannot derive parameters for stored procedure".

If I do not use the DataSet Wizard, but instead create a dataset through code, the function works.

Here's a sample of the C# code is use:

OracleConnection conn = new OracleConnection();
conn.Direct = true;
conn.Server = "orion";
conn.UserId = "dec";
conn.Password = "berlin";
conn.Sid = "dev";
conn.Port = 1521;
conn.Open();
OracleCommand cmd = new OracleCommand();
cmd.Connection = conn;
cmd.CommandType = CommandType.StoredProcedure;
cmd.CommandText = "report_procedures.ka1";
cmd.Parameters.Add("datefrom", new DateTime(2007, 4, 30));
cmd.Parameters.Add("dateto", new DateTime(2007, 5, 6));
cmd.Parameters.Add("gb", DBNull.Value);
cmd.Parameters.Add("st", 5);
cmd.Parameters.Add("kst", DBNull.Value);
cmd.Parameters.Add("gw", DBNull.Value);
OracleParameter par = new OracleParameter();
par.ParameterName = "data";
par.Direction = ParameterDirection.ReturnValue;
par.OracleDbType = OracleDbType.Cursor;
cmd.Parameters.Add(par);
cmd.ExecuteNonQuery();
OracleCursor oc = cmd.Parameters["data"].Value as OracleCursor;
OracleDataAdapter da = new OracleDataAdapter();
DataSet dataSet_KA1 = new DataSet();
da.Fill(dataSet_KA1, oc);
conn.Close();

Can anyone help me?

Best Regards

Marc Vanhoecke

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Mon 27 Aug 2007 12:36

We are investigating this problem.
You will be notified on results as soon as possible.

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Mon 03 Sep 2007 07:45

This problem is fixed. Look forward to the next build.

marc.vanhoecke
Posts: 11
Joined: Mon 27 Aug 2007 08:24

Post by marc.vanhoecke » Tue 04 Sep 2007 06:24

Thanks!

Much appreciated...

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Tue 04 Sep 2007 08:07

You are welcome.

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Fri 07 Sep 2007 11:02

Please try new version of OraDirect .NET 4.20.21!

Post Reply