2005-03-03 10:25:40 宛如梦幻@-01py http://bulo.163.com/article/-01py-MUWXHw.html 复制 评论
  •  ASE .NET Data Provider  
  •  MySQLDirect .NET Data Provider  
  •  ODBC .NET Data Provider
  •  OLE DB .NET Data Provider
  •  Oracle .NET Data Provider - From Microsoft
  •  Oracle .NET Data Provider - From Oracle    
  •  OraDirect .NET Data Provider   
  •  PostgreSQLDirect .NET Data Provider   
  •  SQL Server .NET Data Provider

    • Adaptive Server Enterprise (ASE)
       .NET Data Provider
       Sybase.Data.AseClient

    The ASE .NET Data Provider is an add-on component to the .NET 1.1 Framework that allows you to access a Sybase Adaptive Server Enterprise (ASE) database.
    Using C#

    using Sybase.Data.AseClient;...AseConnection oAseConn = new AseConnection();oAseConn.ConnectionString = "Data Source=(local);" +                            "Initial Catalog=myDatabaseName;" +                            "User ID=myUsername;" +                            "Password=myPassword"oAseConn.Open();
    
    Using VB.NET
    Imports System.Data.AseClient...Dim oAseConn As AseConnection = New AseConnection()oAseConn.ConnectionString = "Data Source=(local);" & _                            "Initial Catalog=myDatabaseName;" & _                            "User ID=myUsername;" & _                            "Password=myPassword"oAseConn.Open()

    For more information, see:  ASE User's Guide


    • MySQLDirect .NET Data Provider
       CoreLab.MySql

    The MySQLDirect .NET Data Provider is an add-on component to the
    .NET Framework that allows you to access the MySQL database using
    native MySQL network protocol or MySQL client, without going through
    OLE DB or ODBC.
    Using C#

    using CoreLab.MySql;
    
    MySqlConnection oMySqlConn = new MySqlConnection(); oMySqlConn.ConnectionString = "User ID=myUsername;" +                              "Password=myPassword;" +                              "Host=localhost;" +                              "Port=3306;" +                              "Database=myDatabaseName;" +                              "Direct=true;" +                              "Protocol=TCP;" +                              "Compress=false;" +                              "Pooling=true;" +                              "Min Pool Size=0;" +                              "Max Pool Size=100;" +                              "Connection Lifetime=0"; oMySqlConn.Open();

    Using VB.NET

    Imports CoreLab.MySql
    
    Dim oMySqlConn As MySqlConnection = New MySqlConnection() oMySqlConn.ConnectionString = "User ID=myUsername;" & _                              "Password=myPassword;" & _                              "Host=localhost;" & _                              "Port=3306;" & _                              "Database=myDatabaseName;" & _                              "Direct=true;" & _                              "Protocol=TCP;" & _                              "Compress=false;" & _                              "Pooling=true;" & _                              "Min Pool Size=0;" & _                              "Max Pool Size=100;" & _                              "Connection Lifetime=0"oMySqlConn.Open()

    For more information, see:   CoreLab's MySqlDirect .NET Data Provider


    •  ODBC .NET Data Provider
       System.Data.ODBC

    The Open Database Connectivity (ODBC) .NET Data Provider is an add-on component to the .NET Framework. It provides access to native ODBC drivers the same way the OLE DB .NET Data Provider provides access to native OLE DB providers.
    Note: This technology is included in version 1.1 of the .NET Framework. You need only download this, if you are running version 1.0.
    For SQL Server ODBC Driver

    ' VB.NETImports System.Data.Odbc...Dim oODBCConnection As OdbcConnectionDim sConnString As String = _          "Driver={SQL Server};" & _          "Server=MySQLServerName;" & _          "Database=MyDatabaseName;" & _          "Uid=MyUsername;" & _          "Pwd=MyPassword"oODBCConnection = New Odbc.OdbcConnection(sConnString)oODBCConnection.Open()

    For Oracle ODBC Driver

    ' VB.NETImports System.Data.Odbc...Dim oODBCConnection As OdbcConnectionDim sConnString As String = _         "Driver={Microsoft ODBC for Oracle};" & _         "Server=OracleServer.world;" & _         "Uid=myUsername;" & _         "Pwd=myPassword"oODBCConnection = New Odbc.OdbcConnection(sConnString)oODBCConnection.Open()

    For Access (JET) ODBC Driver

    ' VB.NETImports System.Data.Odbc...Dim oODBCConnection As OdbcConnectionDim sConnString As String = _         "Driver={Microsoft Access Driver (*.mdb)};" & _         "Dbq=c:/somepath/mydb.mdb;" & _         "Uid=Admin;" & _         "Pwd="oODBCConnection = New Odbc.OdbcConnection(sConnString)oODBCConnection.Open()

    For Sybase System 11 ODBC Driver

    ' VB.NETImports System.Data.Odbc...Dim oODBCConnection As OdbcConnectionDim sConnString As String = _           "Driver={Sybase System 11};" & _                   "SRVR=mySybaseServerName;" & _                   "DB=myDatabaseName;" & _                   "UID=myUsername;" & _                   "PWD=myPassword"oODBCConnection = New OdbcConnection(sConnString)oODBCConnection.Open()

    For all other ODBC Drivers

    ' VB.NETImports System.Data.Odbc...Dim oODBCConnection As OdbcConnectionDim sConnString As String = "Dsn=myDsn;" & _                            "Uid=myUsername;" & _                            "Pwd=myPassword"oODBCConnection = New Odbc.OdbcConnection(sConnString)oODBCConnection.Open()

    For more information, see:  OdbcConnection Class and .NET Data Providers
    To view Microsoft KB articles related to OdbcConnection, click here


    •  OLE DB .NET Data Provider
       System.Data.OleDb

    The Microsoft .NET Framework Data Provider for OLE DB allow you to use native OLE DB providers (e.g.  Microsoft.JET.OLEDB.4.0) through COM interop to enable data access. 
    The Microsoft .NET Framework Data Provider for OLE DB is included in both the 1.0 and 1.1 version of the .NET Framework. 
    For IBM AS/400 OLE DB Provider

    ' VB.NETImports System.Data.OleDb...Dim oOleDbConnection As OleDbConnectionDim sConnString As String = _           "Provider=IBMDA400.DataSource.1;" & _           "Data source=myAS400DbName;" & _           "User Id=myUsername;" & _           "Password=myPassword"oOleDbConnection = New OleDb.OleDbConnection(sConnString)oOleDbConnection.Open()

    For JET OLE DB Provider

    ' VB.NETImports System.Data.OleDb...Dim oOleDbConnection As OleDbConnectionDim sConnString As String = _         "Provider=Microsoft.Jet.OLEDB.4.0;" & _         "Data Source=C:/myPath/myJet.mdb;" & _         "User ID=Admin;" & _         "Password=" oOleDbConnection = New OleDb.OleDbConnection(sConnString)oOleDbConnection.Open()

    For Oracle OLE DB Provider

    ' VB.NETImports System.Data.OleDb...Dim oOleDbConnection As OleDbConnectionDim sConnString As String = _         "Provider=OraOLEDB.Oracle;" & _         "Data Source=MyOracleDB;" & _         "User ID=myUsername;" & _         "Password=myPassword" oOleDbConnection = New OleDb.OleDbConnection(sConnString)oOleDbConnection.Open()

    For SQL Server OLE DB Provider

    ' VB.NETImports System.Data.OleDb...Dim oOleDbConnection As OleDbConnectionDim sConnString As String = _         "Provider=sqloledb;" & _          "Data Source=myServerName;" & _         "Initial Catalog=myDatabaseName;" & _         "User Id=myUsername;" & _         "Password=myPassword" oOleDbConnection = New OleDb.OleDbConnection(sConnString)oOleDbConnection.Open()

    For Sybase ASE OLE DB Provider

    ' VB.NETImports System.Data.OleDb...Dim oOleDbConnection As OleDbConnectionDim sConnString As String = _         "Provider=Sybase ASE OLE DB Provider;" & _         "Data Source=MyDataSourceName;" & _         "Server Name=MyServerName;" & _         "Database=MyDatabaseName;" & _         "User ID=myUsername;" & _         "Password=myPassword" oOleDbConnection = New OleDb.OleDbConnection(sConnString)oOleDbConnection.Open()

    For more information, see:  OleDbConnection Class and .NET Data Providers
    To view Microsoft KB articles related to OleDbConnection, click here


    •  Oracle .NET Data Provider - From Microsoft
       System.Data.OracleClient

    The Microsoft .NET Framework Data Provider for Oracle is an add-on component to the .NET Framework 1.0 that provides access to an Oracle database using the Oracle Call Interface (OCI) as provided by Oracle Client software.
    Oracle 8i Release 3 (8.1.7) Client or later must be installed for this provider to function correctly.
    Note: This .NET Data Provider is included in version 1.1 of the .NET Framework. You need only download this, if you are running version 1.0.
    Using C#:

    using System.Data.OracleClient;
    
    OracleConnection oOracleConn = new OracleConnection();oOracleConn.ConnectionString = "Data Source=Oracle8i;" +                               "Integrated Security=SSPI";oOracleConn.Open();

    Using VB.NET:

    Imports System.Data.OracleClient
    
    Dim oOracleConn As OracleConnection = New OracleConnection()oOracleConn.ConnectionString = "Data Source=Oracle8i;" & _                               "Integrated Security=SSPI";oOracleConn.Open()

    For more information, see:   OracleConnection Class and .NET Data Providers
    To view Microsoft KB articles related to OracleConnection, click here


    •  Oracle .NET Data Provider - From Oracle
       Oracle.DataAccess.Client

    The Oracle .NET Framework Data Provider from Oracle is an add-on component to the .NET Framework.
    Using C#

    using Oracle.DataAccess.Client;...OracleConnection oOracleConn = new OracleConnection();oOracleConn.ConnectionString = "Data Source=MyOracleServerName;" +                               "Integrated Security=SSPI";oOracleConn.Open();

    Using VB.NET

    Imports Oracle.DataAccess.Client...Dim oOracleConn As OracleConnection = New OracleConnection()oOracleConn.ConnectionString = "Data Source=MyOracleServerName;" & _                               "Integrated Security=SSPI";oOracleConn.Open()

    For more information, see: Oracle Data Provider for .NET


    •  OraDirect .NET Data Provider - From CoreLab
       CoreLab.Oracle

    The OraDirect .NET Data Provider is an add-on component to the .NET
    Framework that provides access to an Oracle database using the Oracle
    Call Interface (OCI) as provided by Oracle Client software.

    Using C#

    using CoreLab.Oracle;
    
    OracleConnection oOracleConn = new OracleConnection(); oOracleConn.ConnectionString = "User ID=myUsername;" +                              "Password=myPassword;" +                              "Host=(local);" +                              "Pooling=true;" +                              "Min Pool Size=0;" +                              "Max Pool Size=100;" +                              "Connection Lifetime=0";oOracleConn.Open();

    Using VB.NET

    Imports CoreLab.Oracle
    
    Dim oOracleConn As OracleConnection = New OracleConnection() oOracleConn.ConnectionString = "User ID=myUsername;" & _                              "Password=myPassword;" & _                              "Host=(local);" & _                              "Pooling=true;" & _                              "Min Pool Size=0;" & _                              "Max Pool Size=100;" & _                              "Connection Lifetime=0"oOracleConn.Open()

    For more information, see:  OraDirect .NET Data Provider


    •  MySQL .NET Data Provider
       EID.MySqlClient

    The MySQL .NET Native Provider is an add-on component to the .NET Framework that allows you to access the MySQL database through
     the native protocol, without going through OLE DB or ODBC.
    Using C#

    using EID.MySqlClient;...MySqlConnection oMySqlConn = new MySqlConnection();oMySqlConn.ConnectionString = "Data Source=(local);" +                              "Database=myDatabaseName;" +                              "User ID=myUsername;" +                              "Password=myPassword;" +                              "Command Logging=false";oMySqlConn.Open();

    Using VB.NET

    Imports EID.MySqlClient...Dim oMySqlConn As MySqlConnection = New MySqlConnection()oMySqlConn.ConnectionString = "Data Source=(local);"  & _                              "Database=myDatabaseName;"  & _                              "User ID=myUsername;"  & _                              "Password=myPassword;"  & _                              "Command Logging=false"oMySqlConn.Open()

    For more information, see:   EID's MySQL ADO.NET native provider


    •  PostgreSQLDirect .NET Data Provider
       CoreLab.PostgreSql

    The PostgreSQLDirect .NET Data Provider is an add-on component to the
    .NET Framework that allows you to access the PostgreSQL database using
    native message-based protocol, without going through OLE DB or ODBC.

    Using C#

    using CoreLab.PostgreSql;
    
    PgSqlConnection oPgSqlConn = new PgSqlConnection(); oPgSqlConn.ConnectionString = "User ID=myUsername;" +                              "Password=myPassword;" +                              "Host=localhost;" +                              "Port=5432;" +                              "Database=myDatabaseName;" +                              "Pooling=true;" +                              "Min Pool Size=0;" +                              "Max Pool Size=100;" +                              "Connection Lifetime=0";oPgSqlConn.Open();

    Using VB.NET

    Imports CoreLab.PostgreSql
    
    Dim oPgSqlConn As PgSqlConnection = New PgSqlConnection() oPgSqlConn.ConnectionString = "User ID=myUsername;" & _                              "Password=myPassword;" & _                              "Host=localhost;" & _                              "Port=5432;" & _                              "Database=myDatabaseName;" & _                              "Pooling=true;" & _                              "Min Pool Size=0;" & _                              "Max Pool Size=100;" & _                              "Connection Lifetime=0"oPgSqlConn.Open()

    For more information, see:   PostgreSQLDirect .NET Data Provider


    •  SQL Server .NET Data Provider
       System.Data.SqlClient

    The SQL Server .NET Data Provide allows you to connect to a Microsoft SQL Server 7.0 or 2000 database.  For Microsoft SQL Server 6.5 or earlier, use the OLE DB .NET Data Provider with  the "SQL Server OLE DB Provider" (SQLOLEDB).
    Note: The SQL Server .NET Data Provider knows which data provider it is.  Hence the "provider=" part of the connection string is not needed. 
    Using C#:

    using System.Data.SqlClient;...SqlConnection oSQLConn = new SqlConnection();oSQLConn.ConnectionString = "Data Source=(local);" +                            "Initial Catalog=myDatabaseName;" +                            "Integrated Security=SSPI";oSQLConn.Open();

    Using VB.NET:

    Imports System.Data.SqlClient...Dim oSQLConn As SqlConnection = New SqlConnection()oSQLConn.ConnectionString = "Data Source=(local);" & _                            "Initial Catalog=myDatabaseName;" & _                            "Integrated Security=SSPI"oSQLConn.Open()

    If connection to a remote server (via IP address):

    oSQLConn.ConnectionString = "Network Library=DBMSSOCN;" & _                            "Data Source=xxx.xxx.xxx.xxx,1433;" & _                            "Initial Catalog=myDatabaseName;" & _                            "User ID=myUsername;" & _                            "Pas sword=myPassword"

    Where: 
    - "Network Library=DBMSSOCN" tells SqlConnection to use TCP/IP Q238949
    - xxx.xxx.xxx.xxx is an IP address.  
    - 1433 is the default port number for SQL Server.  Q269882 and Q287932
    - You can also add " Encrypt=yes" for encryption 
     
    For more information, see:  SqlConnection Class, Q308656, and .NET Data Providers
    Note: Microsoft SQLXML Managed Classes exposes the functionality of SQLXML inside the Microsoft .NET Framework.
    To view Microsoft KB articles related to SQLClient, click here

.NET Data Provider相关推荐

  1. 解决【Unable to find the requested .Net Framework Data Provider. It may not be installed.】错误...

    某项目中使用了MYSQL+ ENTITY来做数据访问层. 本地环境运行正常,但在服务器上运行时报出[ Unable to find the requested .Net Framework Data ...

  2. sap gateway data provider - /IWFND/IF_MGW_CORE_RUNTIME

    Created by Wang, Jerry, last modified on Mar 24, 2015 /iwfnd/cl_mgw_prov_delegator~read_entity in li ...

  3. c 连接mysql.mwb_CodeSmith连接mysql提示“找不到请求的 .Net Framework Data Provider”的解决方法...

    下载了codesmith 8,连接Mysql却提示"找不到请求的 .Net Framework Data Provider". 1,下载MySql.Data.dll:https:/ ...

  4. vs2017生成sqlserver 2017项目出现.Net SqlClient Data Provider: Msg 10343

    一.使用vs2017生成sqlserver 2017项目时由于添加的程序集(CLR集成,可以参考后面给出的链接进行理解) ,由于安全权限的配置不正确引发以下的问题: SQL72014: .Net Sq ...

  5. 【转】“数据提供程序或其他服务返回 E_FAIL 状态” 或者 Data provider or other service returned an E_FAIL status.

    "数据提供程序或其他服务返回 E_FAIL 状态"  或者  Data provider or other service returned an E_FAIL status. 使 ...

  6. 论文笔记——Stitcher:Feedback-driven Data Provider for Object Detection

    论文下载: https://arxiv.org/pdf/2004.12432.pdf 论文摘要: 代码暂未开源 该论文摘要概括:目标检测器的效果是根据物体尺度的不同而不同,在小对象性能上是最不令人满意 ...

  7. Firebird Data Provider For .NET 连接 Firebird 数据库文件

    下载 Firebird 嵌入式数据库:Firebird-2.5.0.25920-0_Win32_embed_pdb_RC2(ZIP格式,8.5MB)  下载解压到本地磁盘即可,无需安装. 利用可视化的 ...

  8. mysql6获取不到连接_codesmith6.5连接Mysql提示“找不到请求的 .Net Framework Data Provider。可能没有安装。”解决方法...

    系统 centos6.5 Mysql5.6的安装过程 1.http://dev.mysql.com/downloads/mysql/下载tar包 选择系统: Linux - Generic (glib ...

  9. Unable to find the requested .Net Framework Data Provider

    换了个系统后发现VS2010和VS2012都有同样问题,在SQL EXPLORER 里连不上SQL Server,这也导致了打不开 dbml文件,会报错: The operation could no ...

最新文章

  1. JavaScript学习(八)
  2. windows 下使用caffy_折腾下Windows下的Elasticsearch安装与使用
  3. 文件描述符fd、文件指针fp和vfork()
  4. 计算机二级c语言选择题范围,计算机二级C语言考点选择结构
  5. 微信小程序wepy框架资源汇总
  6. 单独使用ckfinder选择图片
  7. 51单片机redefinition_lcd12864程序在keil中出现好多重新定义,尝试了很多办法都改不了,求助大家了...
  8. 江西直播源PHP代理,直播源更新平台
  9. 计算机网络高级软件编程技术
  10. 一个img文件-实验吧
  11. 易语言选单选框分组框API全选取消
  12. 2017-2018 ACM-ICPC, Asia Daejeon Regional Contest:Gym 101667K
  13. js java 图片上传_spring(java,js,html) 截图上传图片实例详解
  14. 计算机图形学(三)_图元的属性_4_线的属性_1_线宽
  15. python写入中文json
  16. 牛客国庆集训派对Day1 C-Utawarerumono(扩展欧几里得)
  17. 企立方集团:拼多多推广ROI的计算方式
  18. Matlab rand()函数用法
  19. css 首字下次,css first-letter实现首字(字母)下沉效果
  20. 雅安地震:擦肩而过的预报

热门文章

  1. 【Eclipse最常用快捷键】
  2. Bugzilla 操作手册
  3. python pandas excel数据处理_Python利用pandas处理Excel数据的应用
  4. 用zrender制作一个基础的绘图板,绘图板可用于组态界面的基础性开发
  5. 如何批量将 Word 文档转为 ePub 格式
  6. html高度塌陷问题
  7. 树莓派Ubuntu18.04下无线鼠标延迟问题解决
  8. wps字体缺失,问题
  9. 如何让自己变得更加成熟
  10. Java返回Json文件