用这个吗? If e.Name = "连接名称"
Then Dim dlg As New OpenFileDialog dlg.Filter= "Access文件|*.mdb" If dlg.ShowDialog = DialogResult.Ok Then e.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & dlg.FileName & ";Persist Security Info=False" End
If End
if