Page 1 of 1

Help on Cursors not specific enough

Posted: Thu 30 Jun 2005 14:51
by Giles_Collingwood
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)
...

Posted: Mon 04 Jul 2005 12:19
by Paul
You must receive two datatables in dataSet

Posted: Mon 04 Jul 2005 12:22
by Giles_Collingwood
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

Posted: Mon 11 Jul 2005 13:58
by Paul
You can use TableMappings property in OracleDataAdapter