Properties of SqlConnection
using System;
using System.Data;
using System.Data.SqlClient;
class MySqlConnection {
public static void Main() {
string connectionString = "server=localhost;database=Northwind;uid=sa;pwd=sa";
SqlConnection mySqlConnection = new SqlConnection(connectionString);
mySqlConnection.Open();
Console.WriteLine("mySqlConnection.ConnectionString = " + mySqlConnection.ConnectionString);
Console.WriteLine("mySqlConnection.ConnectionTimeout = " + mySqlConnection.ConnectionTimeout);
Console.WriteLine("mySqlConnection.Database = " + mySqlConnection.Database);
Console.WriteLine("mySqlConnection.DataSource = " + mySqlConnection.DataSource);
Console.WriteLine("mySqlConnection.PacketSize = " + mySqlConnection.PacketSize);
Console.WriteLine("mySqlConnection.ServerVersion = " + mySqlConnection.ServerVersion);
Console.WriteLine("mySqlConnection.State = " + mySqlConnection.State);
Console.WriteLine("mySqlConnection.WorkstationId = " + mySqlConnection.WorkstationId);
mySqlConnection.Close();
}
}
|
HTML code for linking to this page:
Related in same category :
-
-
-
-
-
-
-
|