System.Text.StringBuilder sb = new System.Text.StringBuilder();
string cnString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=DataDirectory\aspxWeb.mdb;";
OleDbConnection cn = new OleDbConnection(cnString);
cn.Open();
OleDbCommand cmd = new OleDbCommand("Select * from Document", cn);
OleDbDataReader dr = cmd.ExecuteReader();
sb.Append("
"); sb.Append(dr["Title"].ToString()); sb.Append(" | ");"); sb.Append(dr["Title"].ToString()); sb.Append(" | ");"); |
div1.InnerHtml = sb.ToString();
dr.Close();
cn.Close();
cn.Dispose();
No comments:
Post a Comment