Click here to Skip to main content
15,921,646 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have a code in my ui

C#
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ct"].ConnectionString);
try
{
  con.Open();
}
catch (SqlException ex)
{
  Response.Write(ex.ToString());
}
DataTable dt = new DataTable();
string query = "select column_name from information_schema.columns where table_name ='" + Session["name"] + "' " + "order by ordinal_position";
SqlDataAdapter sda = new SqlDataAdapter(query, con);
sda.Fill(dt);
string ColumnsName_String = "";
for (int i = 0; i <= dt.Rows.Count - 1; i++)
{
  ColumnsName_String = ColumnsName_String + "," + dt.Rows[i]["column_name"];
  if (ColumnsName_String.StartsWith(","))
  {
    ColumnsName_String = ColumnsName_String.Remove(0, 1);
  }
  dl.table_name = Session["name"].ToString();
  dl.column_name = ColumnsName_String.ToString();
  bl.updatedata(dl);
}
i wants change it into three tier
can u help me????

[edit] code tags and tabulation [/edit]
Posted
Updated 22-Oct-12 21:17pm
v2
Comments
Sergey Alexandrovich Kryukov 23-Oct-12 1:41am    
Three-tier architecture is not the ultimate goal. You need to explain what you want to achieve.
--SA

use this its surely help you to understand 3 tier architectureUse this.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900