首页上一页 1 下一页尾页 1 条记录 1/1页
vb数据库问题
发表在VB答疑区
2010-04-10
是否精华
是
否
版块置顶:
是
否
VB程序运行时总是出现下面错误:
Microsoft (odbc数据管理器)未发现数据源名称并且指定默认驱动程序。
我已在模块里连接了数据库:
Public PublicStr As String
Private con As New ADODB.Connection
Private rs As New ADODB.Recordset
Dim str As String
Public Function cnn() As ADODB.Connection '共享数据库连接
Set cnn = New ADODB.Connection
cnn.Open "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=db_PQCDMS"
End Function
Public Sub Main()
' On Error Resume Next
PublicStr = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=db_PQCDMS"
frm_Star.Show
End Sub
Microsoft (odbc数据管理器)未发现数据源名称并且指定默认驱动程序。
我已在模块里连接了数据库:
Public PublicStr As String
Private con As New ADODB.Connection
Private rs As New ADODB.Recordset
Dim str As String
Public Function cnn() As ADODB.Connection '共享数据库连接
Set cnn = New ADODB.Connection
cnn.Open "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=db_PQCDMS"
End Function
Public Sub Main()
' On Error Resume Next
PublicStr = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=db_PQCDMS"
frm_Star.Show
End Sub