Question Syntax error(missing operator)in query expression

rafi

Member
Joined
Aug 10, 2011
Messages
14
Programming Experience
Beginner
I have got this error when i retrieve the values from database

The error is "Syntax error(missing operator)in query expression "invoice_no=',"

i set the datatype as number for invoice_no.

please help me
 
Try

ad = New OleDbDataAdapter("SELECT * FROM inv_mat where invoice_no=" & Label1.Text, con1)
con1.open()
ad.Fill(ds, "inv_mat")

rpt1.SetDataSource(ds)

CrystalReportViewer1.ReportSource = rpt1




CrystalReportViewer1.Refresh()
catch
MsgBox(ex.Message)
Finally
con1.Close()



End Try
 
vb.net

datatype is number and label is ( Label1.Text = Invoice.txtinv_no.Text

) if it's match then record will be displayed.
 
Back
Top