悬赏!!!VB运行时,提示"出现From子句语法错误",怎么解决?
代码如下PrivateSubForm_Load()rtn=SetWindowPos(Me.hwnd,-1,0,0,0,0,3)'运用API函数SetWindowPos,来...
代码如下
Private Sub Form_Load()
rtn = SetWindowPos(Me.hwnd, -1, 0, 0, 0, 0, 3) '运用API函数SetWindowPos,来实现使窗体置前的功能
Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\制造企业库存管理系统的研究与开发.mdb;Persist Security Info=False"
Adodc1.RecordSource = "select * from StoreRoom"
Adodc1.Refresh
Me.Left = (Screen.Width - Me.Width) / 2
Me.Top = (Screen.Height - Me.Height) / 2
End Sub
"Adodc1.Refresh"这一行老是提示"FROM子句语法错误",其中我已经在ACCESS数据库中建立了一个有关"StoreRoom"的表,它存在的,但是还是运行不成功,出现上面的问题``` 展开
Private Sub Form_Load()
rtn = SetWindowPos(Me.hwnd, -1, 0, 0, 0, 0, 3) '运用API函数SetWindowPos,来实现使窗体置前的功能
Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\制造企业库存管理系统的研究与开发.mdb;Persist Security Info=False"
Adodc1.RecordSource = "select * from StoreRoom"
Adodc1.Refresh
Me.Left = (Screen.Width - Me.Width) / 2
Me.Top = (Screen.Height - Me.Height) / 2
End Sub
"Adodc1.Refresh"这一行老是提示"FROM子句语法错误",其中我已经在ACCESS数据库中建立了一个有关"StoreRoom"的表,它存在的,但是还是运行不成功,出现上面的问题``` 展开
2个回答
展开全部
你先把select * from StoreRoom这句话单独复制出来,放到access里运行一下看看,是否提示出错,出现这个一般是你sql语句写的不正确,仔细检查一下
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
Private Sub Form_Load()
rtn = SetWindowPos(Me.hwnd, -1, 0, 0, 0, 0, 3) '运用API函数SetWindowPos,来实现使窗体置前的功能
Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=制造企业库存管理系统的研究与开发.mdb;Persist Security Info=False"
Adodc1.RecordSource = "select * from StoreRoom"
set datasource=adodc1
Adodc1.Refresh
Me.Left = (Screen.Width - Me.Width) / 2
Me.Top = (Screen.Height - Me.Height) / 2
End Sub
rtn = SetWindowPos(Me.hwnd, -1, 0, 0, 0, 0, 3) '运用API函数SetWindowPos,来实现使窗体置前的功能
Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=制造企业库存管理系统的研究与开发.mdb;Persist Security Info=False"
Adodc1.RecordSource = "select * from StoreRoom"
set datasource=adodc1
Adodc1.Refresh
Me.Left = (Screen.Width - Me.Width) / 2
Me.Top = (Screen.Height - Me.Height) / 2
End Sub
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询