Dim i As Integer, a(1 To 50) As String
Dim conn As New ADODB.Connection
Dim rs As New ADODB.Recordset
conn.ConnectionString = "provider=microsoft.ACE.oledb.12.0;data source=" + App.Path + "\xx.accdb"
conn.Open
Set rs.ActiveConnection = conn
rs.Open "select * from xxxxx"
i = 0
Do While Not rs.EOF
i = i + 1
a(i) = rs.Fields("名称")
List1.AddItem a(i)
rs.MoveNext
Loop
rs.Close
conn.Close
相关文章
- 10-13VB.NET机房收费 & DataGridView与数据库的连接
- 10-13重构版机房收费系统之分层、接口、数据库连接、反射+工厂(vb.net)
- 10-13[Visual Basic]VB连接数据库
- 10-13Unity连接数据库(导入DLL)出现的Visual C# Compiler version 2.9.1.65535问题
- 10-1364 位win 7或windows 8下的visual studio不能连接Oracle数据库调试网站的问题
- 10-13VB.net数据库编程(03):一个SQLserver连接查询的简单样例
- 10-13VS2010 VB 连接数据库SQL2005
- 10-13VB6.0连接MySQL数据库
- 10-13具体解释VB中连接access数据库的几种方法
- 10-13VB.NET & Visual Basic