老师,打开项目前验证数据库是否成功,不成功提示退出项目,以下代码会提示多次什么问题恩?
'判断是否连接数据库
Dim str As String = " Provider=SQLOLEDB.1;Password=Q*************;Persist Security Info=True;User ID=gly;Initial Catalog=*********;Data Source=*********;Persist Security Info=False"
If Connections.TryConnect(str) = False Then
MessageBox.Show("本地网络或服务器网络有问题,请确保网络无问题后重试!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
Syscmd.Project.Exit(False)
End If