01.
Dim
ConnnectionString
As
String
=
"?????????"
02.
Dim
Connection
As
New
OleDbConnection(ConnnectionString)
03.
04.
****
Dim
CommandString
As
String
=
"Select [Field1], [Field2], [Field3] From [MyTable] Where [FieldDate] @StartDate And @EndDate"
05.
06.
Dim
Commnad
As
New
Command(CommandString, Connection)
07.
****Command.Parameters.AddWithValue(
"@StartDate"
, DateTime.Parse(
"01/06/2010"
))
08.
****Command.Parameters.AddWithValue(
"@EndDate"
, DateTime.Parse(
"29/06/2010"
))
09.
10.
Dim
Dt
As
New
DataTable()
11.
12.
Dim
DataAdapter
As
New
OleDbDataAdapter()
13.
DataAdapter.SelectCommand = Command
14.
DataAdapter.Fill(Dt)