C
Charles A. Lackman
Hello,
I am working with an Access Database and am trying to return a Querry that
is between two specified dates, I have tried the following and none of them
work:
1)
ADataAdapter = New OleDb.OleDbDataAdapter("SELECT * FROM Contributions WHERE
'Date' > " & dtpFrom.Text & " and 'Date' < dtpTo.Text & ";",
AConnectionString)
2)
ADataAdapter = New OleDb.OleDbDataAdapter("SELECT * FROM Contributions WHERE
[Date] BETWEEN DATEPART ('" & dtpFrom.Text & "') AND DATEPART ('" &
dtpTo.Text & "')" , AConnectionString)
3)
ADataAdapter = New OleDb.OleDbDataAdapter("SELECT * FROM Contributions WHERE
'Date' > 1/1/2004 and 'Date' < 6/1/2004;", AConnectionString)
No records are returned. Any suggestions will be greatly appreciated.
Thanks,
Chuck
I am working with an Access Database and am trying to return a Querry that
is between two specified dates, I have tried the following and none of them
work:
1)
ADataAdapter = New OleDb.OleDbDataAdapter("SELECT * FROM Contributions WHERE
'Date' > " & dtpFrom.Text & " and 'Date' < dtpTo.Text & ";",
AConnectionString)
2)
ADataAdapter = New OleDb.OleDbDataAdapter("SELECT * FROM Contributions WHERE
[Date] BETWEEN DATEPART ('" & dtpFrom.Text & "') AND DATEPART ('" &
dtpTo.Text & "')" , AConnectionString)
3)
ADataAdapter = New OleDb.OleDbDataAdapter("SELECT * FROM Contributions WHERE
'Date' > 1/1/2004 and 'Date' < 6/1/2004;", AConnectionString)
No records are returned. Any suggestions will be greatly appreciated.
Thanks,
Chuck