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