このコードの何が問題になっていますか?エラーはありませんが、結果はありません。DataGridView_sentがいっぱいになりません。
Dim objConn As New System.Data.OracleClient.OracleConnection
Dim objCmd As New System.Data.OracleClient.OracleCommand
Dim dtAdapter As New System.Data.OracleClient.OracleDataAdapter
Dim ds As New DataSet
Dim strConnString, strSQL As String
strConnString = "Data Source=db;User Id=user;Password=pass;"
strSQL = "select * from table where sentdate between '" & date1 & "' and '" & date2 & "'"
objConn.ConnectionString = strConnString
With objCmd
.Connection = objConn
.CommandText = strSQL
.CommandType = CommandType.Text
End With
dtAdapter.SelectCommand = objCmd
dtAdapter.Fill(ds)
DataGridView_sent.DataSource = ds
dtAdapter = Nothing
objConn.Close()
objConn = Nothing