Everything is achievable through technology

STORE Procedure DAL


SqlCon=@”server=NEWVISION-PC\\SQLEXPRESS ;Integrated Security= True;database=Databasename;”
SqlConnection sqlC = new SqlConnection(SqlCon);


SqlCommand sqlCom = new SqlCommand();
sqlCom.Connection = sqlC;
sqlCom.CommandType = CommandType.StoredProcedure;
sqlCom.CommandText = “SQL Query”;

sqlCom.Parameters.AddWithValue(“@OptionType”, OptionType);
sqlCom.Parameters.AddWithValue(“@Type”, Type);
sqlCom.Parameters.AddWithValue(“@param1”, param1);
sqlCom.Parameters.AddWithValue(“@param2”, param2);
sqlCom.Parameters.AddWithValue(“@param3”, param3);
sqlCom.Parameters.AddWithValue(“@param4”, param4);
sqlCom.Parameters.AddWithValue(“@param5”, param5);

SqlDataAdapter sqla = new SqlDataAdapter(sqlCom);
return ds;
catch (Exception ex)
throw ex;

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s