using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.SqlClient;

namespace ajans
{
    class connection2
    {
        static public SqlConnection objconnection = new SqlConnection();
        static public SqlCommand objcommand = new SqlCommand();
        static public SqlDataReader objreader;

        static public void CreatConnection()
        {
            objconnection.Close();
            objconnection.ConnectionString = @"Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\ajans.mdf;Integrated Security=True;User Instance=True";
            objconnection.Open();
            objcommand.Connection = objconnection;
        }
    }
}
