tanmoy Level: Whizz Kid
 Registered: 17-03-2006 Posts: 18
|
want to show some entry from database in datagrid thuroug user difine date
hello every one.i have a problem.i want to see som entry from database in datagrid as per date.the date is given by user.and the field of database table is a 'date' type field.i use this coding but this is worked on 'text' type field.i want to see data from 'date' type field.i give u my coding in below.
Dim seldat As New OleDb.OleDbDataAdapter()
pm.TextBox2.Text = pm.DateTimePicker1.Value
Dim inv As String
inv = "select * from payment where Dat='" & pm.TextBox2.Text & "'"
seldat.SelectCommand = New OleDb.OleDbCommand(inv, con)
ds.Tables("payment").Clear()
seldat.Fill(ds, "payment")
pm.DataGrid1.DataSource = ds.Tables("payment")
here "payment" is my table name.and "Dat" is my date tyfe field name.please help me.thank you.
____________________________
ambarish sadhu
|