leoo 发表于 2009-5-12 16:06

求救 vb连access语句出错

Private Sub Refresh_Layer()
Dim strSch As String
strSch = ""
If Len(Trim(dco_Bld.Text)) > 0 Then
    strSch = " And BuildingNo='" + Trim(dco_Bld.BoundText()) + "'"
End If
'设置数据源
Adodc1.ConnectionString = Conn
   Adodc1.RecordSource = "SELECT LayerId As 楼层编号,Roomnum As 房间数," _
    + "BuildingNo As 建筑物名称,LayerNo As 具体楼层" + strSch _
    + "Memos As 备注信息 FROM Layer ORDER BY LayerNo"
Adodc1.Refresh
Set DataGrid1.DataSource = Adodc1
DataGrid1.Columns(0).Width = 0'编号
DataGrid1.Columns(1).Width = 1200'房间数
DataGrid1.Columns(2).Width = 1200'建筑物编号
DataGrid1.Columns(3).Width = 1000'具体搂层
DataGrid1.Columns(4).Width = 1000'备注信息
End Sub



提示:FROM语句出错

寂寞 发表于 2009-5-25 14:20

最起码也要把错误信息复制出来给人看吧!

leoo 发表于 2009-5-27 09:11

I'M SORRY.我下次会注意的了.还有,问题已解决了.谢谢大家

iptton 发表于 2009-5-27 11:47

解决了能否说下如何解决?也许明天就有人和你遇到完全一样的问题..

leoo 发表于 2009-5-29 23:15

太久没看这帖子了,忘了,具体问题具体分析好了

leoo 发表于 2009-5-29 23:15

太久没看这帖子了,忘了,具体问题具体分析好了
页: [1]
查看完整版本: 求救 vb连access语句出错