VB 实时错误'-2147217904':至少有一个参数没有指定值
PrivateSubCommand1_Click()DimsqlAsStringDimbcAsStringSetconn=NewADODB.Connectionconn....
Private Sub Command1_Click()
Dim sql As String
Dim bc As String
Set conn = New ADODB.Connection
conn.Provider = "MSDataShape"
conn.ConnectionString = "Provider=MSDataShape;Data Source=e:\mydb.mdb; Data Provider=Microsoft.Jet.OLEDB.4.0"
Text1.Text = bc
conn.Open
sql = "SHAPE {SELECT * FROM 123 where 班次 = bc} AS Orders "
rs.StayInSync = True
rs.Open sql, conn, adOpenKeyset, adLockOptimistic
Set DataGrid1.DataSource = rs
End Sub
程序运行提示:VB 实时错误'-2147217904':至少有一个参数没有指定值,是哪里有问题啊,请教
数据库是access,如果按#"& bc &"# 查询,就提示日期的语法错误,请指教 展开
Dim sql As String
Dim bc As String
Set conn = New ADODB.Connection
conn.Provider = "MSDataShape"
conn.ConnectionString = "Provider=MSDataShape;Data Source=e:\mydb.mdb; Data Provider=Microsoft.Jet.OLEDB.4.0"
Text1.Text = bc
conn.Open
sql = "SHAPE {SELECT * FROM 123 where 班次 = bc} AS Orders "
rs.StayInSync = True
rs.Open sql, conn, adOpenKeyset, adLockOptimistic
Set DataGrid1.DataSource = rs
End Sub
程序运行提示:VB 实时错误'-2147217904':至少有一个参数没有指定值,是哪里有问题啊,请教
数据库是access,如果按#"& bc &"# 查询,就提示日期的语法错误,请指教 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询