Help on Cursors not specific enough

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
Giles_Collingwood
Posts: 15
Joined: Mon 28 Feb 2005 13:58
Location: London, UK

Help on Cursors not specific enough

Post by Giles_Collingwood » Thu 30 Jun 2005 14:51

Hi,

This is in the help guide: but how do I control the table names that are used for the 2 cursors please?

Thanks

Giles

[Visual Basic]

...
Dim cmdText As string = "begin open :cur1 for select * from dept; open :cur2 for select * from emp; end;"
Dim oraCommand As OracleCommand = new OracleCommand(cmdText, oraConnection)
oraCommand.Parameters.Add("cur1", OracleDbType.Cursor)
oraCommand.Parameters("cur1").Direction = ParameterDirection.Output
oraCommand.Parameters.Add("cur2", OracleDbType.Cursor)
oraCommand.Parameters("cur2").Direction = ParameterDirection.Output
oraDataAdapter.SelectCommand = oraCommand
oraDataAdapter.Fill(dataSet)
...

Paul
Posts: 725
Joined: Thu 28 Oct 2004 14:06

Post by Paul » Mon 04 Jul 2005 12:19

You must receive two datatables in dataSet

Giles_Collingwood
Posts: 15
Joined: Mon 28 Feb 2005 13:58
Location: London, UK

Post by Giles_Collingwood » Mon 04 Jul 2005 12:22

Yes, that is what I want to do.

I want to put cur1 into a table called MyTable1
and Cur2 into a table called OtherTable both in the same dataset.

How do I control the names fo the target tables?

Thanks

Giles

Paul
Posts: 725
Joined: Thu 28 Oct 2004 14:06

Post by Paul » Mon 11 Jul 2005 13:58

You can use TableMappings property in OracleDataAdapter

Post Reply