VB本地连接SQL数据库,实时错误:连接字符串属性无效. 20
在模块中:PublicadoConAsNewADODB.ConnectionPublicadoRsAsNewADODB.RecordsetPublicCnnStrAsSt...
在模块中:
Public adoCon As New ADODB.Connection
Public adoRs As New ADODB.Recordset
Public CnnStr As String
Public Sub Main()
CnnStr = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=damonf;password =fjq;Initial Catalog=db_APDBMS;Data Source=."
If adoCon.state = adStateClosed Then adoCon.Open (CnnStr)
End Sub
运行时:提示实时错误,连接字符串属性无效。
错误指示在:adoCon.Open (CnnStr)
请问,应该怎么改?谢谢~ 展开
Public adoCon As New ADODB.Connection
Public adoRs As New ADODB.Recordset
Public CnnStr As String
Public Sub Main()
CnnStr = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=damonf;password =fjq;Initial Catalog=db_APDBMS;Data Source=."
If adoCon.state = adStateClosed Then adoCon.Open (CnnStr)
End Sub
运行时:提示实时错误,连接字符串属性无效。
错误指示在:adoCon.Open (CnnStr)
请问,应该怎么改?谢谢~ 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询