Guyz I have a table named fec in which i hv column named EndDt having Date/Time Data type.Now i want to display those records in my report which have EndDt less than Date i pick from DateTimePicker and month is current month.
Private Sub DtpDefault_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DtpDefault.ValueChanged
Call Connection()
Dim s As String = Month(Now)
Dim d As Date = Date.Now
dsLogin = New DataSet("GymDatDataSet")
daLogin = New OleDb.OleDbDataAdapter("Select * from fec where Mnth=Month(now) AND EndDt<'" & DtpDefault.Text & "'", con)
daLogin.Fill(dsLogin, "fec")
Dim cr As New CrystalReportFeeDefaulter
cr.SetDataSource(dsLogin)
CrystalReportViewer1.ReportSource = cr
CrystalReportViewer1.Refresh()
End Sub
End Class
Now problem is that i get deata type mismatch error at line daLogin.Fill(dsLogin,"fec")
Pls help me,i need solution urgently