G
Guest
How can i get this work going against an Oracle Table? I have it working with SQL, but when I change my db to Oracle I get an error.
The where clause is based on what is selected in the drop down box.
objConn = New OracleConnection(dbConn)
objConn.Open()
strSQL = "Select car, model from autos where car= @cars"
objDataAdapter = New OracleDataAdapter(strSQL, objConn)
'this is the error line
myCommand.Parameters.Add(New OracleParameter("@cars", OracleDbType.NVarchar2, ParameterDirection.Input))
myCommand.Parameters("@cars").Value = ddSport.SelectedValue
objDataAdapter.Fill(ds)
dgGames.DataSource = ds
dgGames.DataBind()
the error i get is
Object reference not set to an instance of an object on line 79
thanks
The where clause is based on what is selected in the drop down box.
objConn = New OracleConnection(dbConn)
objConn.Open()
strSQL = "Select car, model from autos where car= @cars"
objDataAdapter = New OracleDataAdapter(strSQL, objConn)
'this is the error line
myCommand.Parameters.Add(New OracleParameter("@cars", OracleDbType.NVarchar2, ParameterDirection.Input))
myCommand.Parameters("@cars").Value = ddSport.SelectedValue
objDataAdapter.Fill(ds)
dgGames.DataSource = ds
dgGames.DataBind()
the error i get is
Object reference not set to an instance of an object on line 79
thanks