Help on Cursors not specific enough
Posted: 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)
...
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)
...