using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Data.OleDb;
using System.Data.SqlClient;
using System.IO;
public class MainClass{
public static void Main(){
string ConnectionString ="server=(local)\\SQLEXPRESS;database=MyDatabase;Integrated Security=SSPI;";
SqlConnection conn = new SqlConnection(ConnectionString);
try
{
conn.Open();
}
catch(SqlException ae)
{
Console.WriteLine("{0}: Threw an Error: ***{1}***"+
"with SqlServer Code {2}",
ae.Errors[0].Server,
ae.Errors[0].Message,ae.Errors[0].Number);
}
}
}