Dim con1 As OleDb.OleDbConnection
Dim cmd As OleDb.OleDbCommand
Dim query As String
Dim rs As OleDb.OleDbDataReader
con1 = New OleDb.OleDbConnection("Provider=MSDAORA.1;Data Source=localhost;Persist Security Info=True;Password=sys;User ID=nitishok")
con1.Open()
query = "select * from HOLDERSDB where DOB like '" + DateTimePicker1.Value + "' "
cmd = New OleDb.OleDbCommand(query, con1)
cmd.CommandType = CommandType.Text
rs = cmd.ExecuteReader
Dim da As New OleDb.OleDbDataAdapter(query, con1)
Dim ds As New DataSet()
da.Fill(ds, "HOLDERSDB")
DataGridView1.DataSource = ds.Tables(0)
con1.Close()
enter code here
datetimepicker1としてDOBを持つHOLDERSテーブルの行が必要です。投稿したコードは結果を返しません。
Plzヘルプ。