levyuk said:You'll have to be more specific about what you are trying to do. Where are you passing parameters too? What is the datasource? etc
jmcilhinney said:If you are currently using SQL similar to:
SELECT * FROM Table WHERE id = <idvalue>
then you would now use something like:
SELECT * FROM Table WHERE id = <idvalue> AND date = #<datevalue>#
Dates may get passed to different databases in different ways.
Dim connection As New OleDb.OleDbConnection
Dim adapter As New OleDb.OleDbDataAdapter("SELECT * FROM Table1 WHERE idfield = @id AND datefield = @date", connection)
Dim table As New DataTable
adapter.SelectCommand.Parameters.Add("@id", OleDb.OleDbType.Integer)
adapter.SelectCommand.Parameters.Add("@date", OleDb.OleDbType.DBDate)
adapter.SelectCommand.Parameters("@id").Value = Me.TextBox1.Text
adapter.SelectCommand.Parameters("@date").Value = Me.DateTimePicker1.Value.Date
adapter.Fill(table)