主题:vb2008新手求解啊
Dim conn As New ADODB.Connection '定义数据库对象
Dim rs As New ADODB.Recordset '定义记录集对象
Dim i As Integer
conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + Application.StartupPath + "\tsglxt.mdb;"
conn.Open()
rs = New ADODB.Recordset
rs.ActiveConnection = conn
rs.Open("Select 用户名 From gly", conn, ADODB.CursorTypeEnum.adOpenKeyset, ADODB.LockTypeEnum.adLockOptimistic)
rs.MoveFirst()
For i = 1 To rs.RecordCount
ComboBox1.Items.Add(rs.Fields(0))
rs.MoveNext()
Next i
rs.Close()
为什么combox中不显示数据库中的用户名啊
而显示System.__comObject啊!!什么情况
急!急!急!急啊!
Dim rs As New ADODB.Recordset '定义记录集对象
Dim i As Integer
conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + Application.StartupPath + "\tsglxt.mdb;"
conn.Open()
rs = New ADODB.Recordset
rs.ActiveConnection = conn
rs.Open("Select 用户名 From gly", conn, ADODB.CursorTypeEnum.adOpenKeyset, ADODB.LockTypeEnum.adLockOptimistic)
rs.MoveFirst()
For i = 1 To rs.RecordCount
ComboBox1.Items.Add(rs.Fields(0))
rs.MoveNext()
Next i
rs.Close()
为什么combox中不显示数据库中的用户名啊
而显示System.__comObject啊!!什么情况
急!急!急!急啊!