• net数据库连接字符


    1、联接SQL Server
         A、ODBC 方式
                Standard Security方式:"Driver={SQL Server};Server=Aron1;Database=pubs;Uid=sa;Pwd=asdasd;" 
                Trusted 方式:"Driver={SQL Server};Server=Aron1;Database=pubs;Trusted_Connection=yes;" 
                需要提示的:
                oConn.Properties("Prompt") = adPromptAlways
                oConn.Open "Driver={SQL Server};Server=Aron1;DataBase=pubs;" 

        B、OLE DB, OleDbConnection (.NET) 方式
                Trusted 方式:"Provider=sqloledb;Data Source=Aron1;Initial Catalog=pubs;Integrated Security=SSPI;" 
                需要提示的:
                oConn.Provider = "sqloledb"
                oConn.Properties("Prompt") = adPromptAlways
                oConn.Open "Data Source=Aron1;Initial Catalog=pubs;" 
                联接网络数据库:
                "Provider=sqloledb;Data Source=190.190.200.100,1433;Network Library=DBMSSOCN;Initial Catalog=pubs;User ID=sa;Password=asdasd;" 

        C、SqlConnection (.NET)方式
                Standard Security方式:"Data Source=Aron1;Initial Catalog=pubs;User Id=sa;Password=asdasd;" 
                            或"Server=Aron1;Database=pubs;User ID=sa;Password=asdasd;Trusted_Connection=False" 
                Trusted 方式:"Data Source=Aron1;Initial Catalog=pubs;Integrated Security=SSPI;" 
                            或"Server=Aron1;Database=pubs;Trusted_Connection=True;" 
                联接网络数据库:
                            "Data Source=190.190.200.100,1433;Network Library=DBMSSOCN;Initial Catalog=pubs;User ID=sa;Password=asdasd;"
  • 相关阅读:
    <转载>c#多线程:线程池和异步编程
    <转载>讲故事谈.NET委托:一个C#睡前故事
    IIS 7.0 成员管理配置
    呵呵,新开博!
    PHP函数中文文档
    请不要做浮躁的人对程序员的忠告
    php新闻发布完成
    JS调试工具
    PHP配置FCKEditor
    ACEGI配置总结(1)
  • 原文地址:https://www.cnblogs.com/kentyshang/p/576054.html
Copyright © 2020-2023  润新知