using System.Data;
using System.Data.SqlClient;
public void abc()
{
SqlConnection con=new SqlConnection(ConStr);
SqlCommand cmd=new SqlCommand();
cmd.Connection=con;
cmd.CommandText="insert into abc values(@id,@name,@pass)";
cmd.Parameters.Add("@id",SqlDbType.Int,0);
cmd.Parameters.Add("@name",SqlDbType.VarChar,30);
cmd.Parameters.Add("@pass",SqlDbType.VarChar,30);
cmd.Parameters[0].Value=1;
cmd.Parameters[1].Value="aa";
cmd.Parameters[2].Value="aa";
try
{
con.Open();
cmd.ExecuteNonQuery();
con.Close();
}
catch{}
}