Hello Vb.net users
i am having the problem with the below code
Dim selectQuery As String = "Select Price from Items where ItemName = '"
& iname & "' AND size ='" & isize & "'"
If m_ordering.DBConnection.State <> ConnectionState.Open Then
m_ordering.DBConnection.Open()
End If
dim cmd1 As New OleDbCommand(selectQuery, m_ordering.DBConnection)
cmd1.CommandText = selectQuery
Try
cmd1.ExecuteScalar()
Catch ex As Exception
MessageBox.Show(ex.StackTrace)
end try
Thorws me the follwing exception
StackTrace
"
at System.Data.OleDb.OleDbCommand.ExecuteCommandTextE rrorHandling(Int32
hr)
at
System.Data.OleDb.OleDbCommand.ExecuteCommandTextF orSingleResult(tagDBPA
RAMS dbParams, Object& executeResult)
at System.Data.OleDb.OleDbCommand.ExecuteCommandText( Object&
executeResult)
at System.Data.OleDb.OleDbCommand.ExecuteCommand(Comm andBehavior
behavior, Object& executeResult)
at
System.Data.OleDb.OleDbCommand.ExecuteReaderIntern al(CommandBehavior
behavior, String method)
at System.Data.OleDb.OleDbCommand.ExecuteScalar()
at DBOrder.PizzaOrder.cboSize_LostFocus(Object sender, EventArgs e)
in
I got no idea what is wrong?
Can you please help me.
Thanking you all in advance
*** Sent via Developersdex http://www.developersdex.com ***