原Access数据库strConnection = "Provider=Microsoft.jet.oledb.4.0;Data Source=" & App.Path & "\Person.mdb"
改成SQL数据库strConnection = "Provider=Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=MIC"后说找不到程序

解决方案 »

  1.   

    please use the guide to generate the code and test it
      

  2.   

    连接字符串不对
    数据库在本机:
    cn.Open "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=zzgjcj;Data Source=."
    数据库不在本机:
    cn.Open "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=数据库;Data Source=服务名;User ID=sa;Password=sa"
      

  3.   

    (1)是否安装了SQL
    (2)账户是否正确可以使用VB的连接字符串对话框中的测试功能测试下。
      

  4.   

    dim g_strDBConn as new adodb.connection
    With g_strDBConn
        If .State = adStateOpen Then .Close
        .ConnectionString = "driver=SQL Server;server=计算机名或IP地址;uid=sa;pwd=sa的密码;database=数据库名"
        .CommandTimeout = 0
        .Open
    End With
      

  5.   

    http://topic.csdn.net/u/20090903/10/bc56c3f4-f132-4472-90b7-1b6033f75405.html?seed=959003198&r=59531361#r_59531361