Sqlexception
Hi
I have written query like:
dim str as string="true"
Dim cmd As New OleDb.OleDbCommand("Select max(Invoice_No) from Invoice where flag= '" & str & "'", cn)
cn.Open
If IsDBNull(cmd.ExecuteScalar()) = True Then
This statment fires exception:"No value given for one or more required parameters."
when i fire this query directly from access,it runs successfully
what is actual problem,i don't understand
Thanks
monika
|