• λ我爱Aspx >> Asp.Net >> .NET中各种数据库连接的方法
  • .NET中各种数据库连接的方法

  • :未知  Դ:internet  :2007-5-20 16:41:10  ؼ:.net,数据库,数据
  • (DBMSSOCN=TCP/IP instead of Named Pipes, at the end of the Data Source is the port to use (1433 is the default))

    Declare the SqlConnection:

    C#:

    using System.Data.SqlClient;

    SqlConnection oSQLConn = new SqlConnection();

    oSQLConn.ConnectionString="my connectionstring";

    oSQLConn.Open();

    VB.NET:

    Imports System.Data.SqlClient

    Dim oSQLConn As SqlConnection = New SqlConnection()

    oSQLConn.ConnectionString="my connectionstring"

    oSQLConn.Open()

    Data Shape

    MS Data Shape

    "Provider=MSDataShape;Data Provider=SQLOLEDB;Data Source=Aron1;Initial Catalog=pubs;User ID=sa;Password=asdasd;"

    Read more

    How to define wich network protocol to use

    Example:

    "Provider=sqloledb;Data Source=190.190.200.100,1433;Network Library=DBMSSOCN;Initial Catalog=pubs;User ID=sa;Password=asdasd;"

    Ҷƪл˵?
  • һƪ用asp.net画饼图(可用于各种投票程序)
    һƪ得到真实IP