imagelist在使用前必须初始化?

来源:百度知道 编辑:UC知道 时间:2024/07/04 18:29:45
Option Explicit
Dim Gconn As New ADODB.Connection
Dim Rs As ADODB.Recordset
Dim RsField As ADODB.Recordset
Dim MaTable As String
Dim num As Long

Dim BaseConn As String
Dim ChaineConn As String

Private Sub Command1_Click()
Dim Node As Node
Dim etape1 As Node
Dim etape2 As Node
cd.Filter = "Base Access|*.mdb"
cd.ShowOpen
ChaineConn = BaseConn & cd.FileName '
If cd.FileName = "" Then Exit Sub
trv.Nodes.Clear
Gconn.Open ChaineConn

Set Rs = Gconn.OpenSchema(adSchemaTables)
Set Node = trv.Nodes.Add(, , , "<BASE>", 1, 1)
Node.Expanded = True
Do While Not Rs.EOF
Select Case LCase(Rs.Fields(3))
Case "table"
num = 2
Case Is = "view"
num = 5
Case "system table"
num = 6
Case Else
num = 4
End Select
Set etape1 = trv.Nodes.Add(Node, tvwChild, , Rs.Fields(2

那是在哪里出错误?一开始就错,还是按了command1……
这些问题要说清楚,要不很难找症结呀,而且我没有你的数据库文件,如果问题处在数据库那里,那可能还要追究一下系统,我遇过数据库出问题了还得重装系统才能解决(不过本人对数据库非常菜)。