using System;
using System.Data;
using System.Data.SqlClient;
using System.Data.OleDb;
class MainClass {
publicstaticvoid Main() {
using (SqlConnection con = new SqlConnection()) {
con.ConnectionString = @"Data Source=.\sqlexpress;Database=Northwind;Integrated Security=SSPI";
con.Open();
if (con.State == ConnectionState.Open) {
Console.WriteLine(" Workstation Id = " + con.WorkstationId);
} else {
Console.WriteLine("SqlConnection failed to open.");
Console.WriteLine(" Connection State = " + con.State);
}
}
}
}