高手在吗?小弟急十万火急。
If Module1.sqlconn.State <> ConnectionState.Open ThenModule1.sqlconn.Open()
End If
sqlCmd.CommandText = "Select * from 销售表 where 时间 between @strtime1 and @strtime2"
sqlCmd.Connection = Module1.sqlconn
sqlCmd.CommandType = CommandType.Text
sqlDa.SelectCommand = sqlCmd
Try
sqlDa.Fill(Me.ds, "销售表")
Me.DataGrid1.DataSource = ds.Tables("销售表")
Catch ex As Exception
MsgBox("发生错误:" & ex.Message)
End Try
小弟通过这段代码查询一段时间销售的情况``,系统就提示要声明@strtime1和@strtime2变量,这该怎么解决呢``??