vb.net と sql をデータベースとして使用していますが、データベースが検索データを表示できなかったのはなぜですか? このようにdbに保存する私の日付形式=MM/DD/YYYY
Private Function GetDate(ByVal strDev As String, ByVal strDate As String) As DataSet
Dim connectionString As String = "server='abc'; user id='abc'; password='abc'; Database='abc'"
Dim sqlConnection As SqlClient.SqlConnection = New SqlClient.SqlConnection(connectionString)
Dim queryString As String = "SELECT Time_stamp, BB_ID, Status FROM rawdata WHERE (BB_ID = '" & strDev & "') AND (Time_stamp = '5/1/2011')"
Dim sqlCommand As SqlClient.SqlCommand = New SqlClient.SqlCommand(queryString, sqlConnection)
sqlCommand.Parameters.Add("@strDev", System.Data.SqlDbType.Char).Value = strDev
sqlCommand.Parameters.Add("@strDate", System.Data.SqlDbType.Char).Value = strDate
Dim dataAdapter As SqlClient.SqlDataAdapter = New SqlClient.SqlDataAdapter(sqlCommand)
Dim dataSet As DataSet = New DataSet
dataAdapter.Fill(dataSet)
Return dataSet
End Function