1
Answer

OledbException Data type mismatch in criteria expression

Akbar Mukhtar

Akbar Mukhtar

13y
2.7k
1
i get a problem like this OledbException Data type mismatch in criteria expression. in  ad.Fill(xDataset, "TblMaster") i'm using access database and Telerik Reporting

...:::this my code:::...

Please Help me this is my last problem for this project

Public Sub TanggalX()
  conn.Open()
  Dim str As String = "Select * From TblMaster Where Tanggal='" & (Me.DateTimePicker1.Value.Date.ToString("yyyy/MM/dd")) & "'"
  ad = New OleDb.OleDbDataAdapter(str, conn)
  xDataset.Clear()
  ad.Fill(xDataset, "TblMaster")
  obj_RepDoc = New Report1
  obj_RepDoc.DataSource = (xDataset)
  Me.ReportViewer1.Report = obj_RepDoc
  Me.ReportViewer1.RefreshReport()
  conn.Close()
  End Sub
Answers (1)