Click here to Skip to main content
15,918,808 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am getting an error: Invalid operation due to current state of object when executing following piece of code:
VB
dim cmd as oracleCommand= New oraclecommand("Select * from table1")
dim dr as oracleDataReader = cmd.ExecuteReader()

Error generate on the line Cmd.ExecuteReader()

For ConnectionString i used the following constructor:
VB
Public Sub New(ByVal m_conERP As Oracle.DataAccess.Client.OracleConnection, _
   ByVal m_objUser As ERPCommon.User, ByVal m_selectedMenu As ERPCommon.User.Menu)
       Me.New()
       Try
           conERP = m_conERP
           objUser = m_objUser
           selectedMenu = m_selectedMenu
           'StartUp()
       Catch ex As Exception
       End Try
   End Sub
Posted
Updated 15-Aug-10 20:50pm
v2

1 solution

dim dr as New oracleDataReader = cmd.ExecuteReader()
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900