Linux中国  设为主页
 收藏本站
 
当前位置: > 首页 ->数据库应用 ->其他数据库 ->数据库连接字符串大全
  相关分类: 
Access
DB2
Mysql
Oracle
PostgreSQL
SQL Server
Sybase
其他数据库
  站内搜索: 
热门文章排行
热门文章排行 数据库连接字符串大全(06-03)
海量数据库的查询优化及分页算法方案(04-23)
sql年月日计算方法(06-03)
有关 Eclipse 运行命令行参数大全 (04-23)
sql 经典语句(06-03)
精采文章排行
精采文章排行 分析数据库备份过程中九种易出现的情(06-29)
第七届Teradata数据仓库峰会在上海召(06-29)
SQL语句游标For.Loop与Open.Close比(06-29)
渗透测试中攻与守之数据库系统渗透简(06-29)
容灾可捍卫数据安全 确保信息即时恢(06-29)
  ·罗维数据库营销的网络化 改善客户体验 ·精华推荐 数据库系统专用词汇集锦之二 ·轻松七个步骤帮助你来顺利开发数据仓库 ·SQL语句基础学习 帮你明了数值数据类型 ·SQL语句基础学习 从子表里如何删除数据 ·SQL语句基础学习 子选择如何来合并查询 ·逐行扫描 为你讲解几个基本SQLPLUS命令 ·精华推荐 数据库系统专用词汇集锦之一 ·数据库基础知识帮你分析何为ASP数据库

数据库连接字符串大全

作者:Webmaster   来源:Linuxdby.com   点击:   日期:2007-06-03 [收藏] [投稿]

  IE是否经常中毒?推荐您


MultipleActiveResultSets=true equals MARS_Connection=yes

Using MARS with SQL Native Client, by Chris Lee >>
  •  Encrypt data sent over network:
    "Driver={SQL Native Client};Server=Aron1;Database=pubs;Trusted_Connection=yes;Encrypt=yes"


  •  Attach a database file on connect to a local SQL Server Express instance:
    "Driver={SQL Native Client};Server=.\SQLExpress;AttachDbFilename=c:\asd\qwe\mydbfile.mdf;Database=dbname;Trusted_Connection=Yes;"
       - or -
    "Driver={SQL Native Client};Server=.\SQLExpress;AttachDbFilename=|DataDirectory|mydbfile.mdf;Database=dbname;Trusted_Connection=Yes;"
       (use |DataDirectory| when your database file resides in the data directory)
    Why is the "Database" parameter needed? Answer: If the database was previously attached, SQL Server does not reattach it (it uses the attached database as the default for the connection).
    Download the SQL Native Client here >> (the package contains booth the ODBC driver and the OLE DB provider)
    Using SQL Server 2005 Express? Don't miss the server name syntax: SERVERNAME\SQLEXPRESS (Substitute "SERVERNAME" with the name of the computer)
  •  SQL Native Client OLE DB Provider

    •  Standard security:
      "Provider=SQLNCLI;Server=Aron1;Database=pubs;UID=sa;PWD=asdasd;"


    •  Trusted connection:
      "Provider=SQLNCLI;Server=Aron1;Database=pubs;Trusted_Connection=yes;"
      Equivalents
      Integrated Security=SSPI equals Trusted_Connection=yes
    •  Prompt for username and password:
      oConn.Properties("Prompt") = adPromptAlways
      oConn.Open "Provider=SQLNCLI;Server=Aron1;DataBase=pubs;"


    •  Enabling MARS (multiple active result sets):
      "Provider=SQLNCLI;Server=Aron1;Database=pubs;Trusted_Connection=yes;MarsConn=yes"
      Equivalents
      MarsConn=yes equals MultipleActiveResultSets=true equals MARS_Connection=yes

      Using MARS with SQL Native Client, by Chris Lee >>
    •  Encrypt data sent over network:
      "Provider=SQLNCLI;Server=Aron1;Database=pubs;Trusted_Connection=yes;Encrypt=yes"


    •  Attach a database file on connect to a local SQL Server Express instance:
      "Provider=SQLNCLI;Server=.\SQLExpress;AttachDbFilename=c:\asd\qwe\mydbfile.mdf;Database=dbname;Trusted_Connection=Yes;"
         - or -
      "Provider=SQLNCLI;Server=.\SQLExpress;AttachDbFilename=|DataDirectory|mydbfile.mdf;Database=dbname;Trusted_Connection=Yes;"
         (use |DataDirectory| when your database file resides in the data directory)
      Why is the "Database" parameter needed? Answer: If the database was previously attached, SQL Server does not reattach it (it uses the attached database as the default for the connection).
      Download the SQL Native Client here >> (the package contains booth the ODBC driver and the OLE DB provider)
      Using SQL Server 2005 Express? Don't miss the server name syntax: SERVERNAME\SQLEXPRESS (Substitute "SERVERNAME" with the name of the computer)
  •  SqlConnection (.NET)

  • 文章评论】 【收藏本文】 【推荐好友】 【打印本文】 【我要投稿】 【论坛讨论

       相关文章:
    ·精华推荐 数据库系统专用词汇集锦之三

       文章评论:(1条)
      
     请留名: 匿名评论   点击查看所有评论 论坛讨论
     

     声明:刊登此文章是为了传递更多信息,文章内容仅供参考,转载请注明出处。