:: Online Asp.net IDE ::
CodeRun : is an online IDE to compile and debug Asp.net Application
:: Building an N-Tier Application in .NET ::
Introduction :
a lot of people think that building a N-tier application is so diffucult
but to think about it , its alot easy and make sense
its just make partion of the project
Background
N-Tier is a Client-Server Architecture in which User interface (Presentation Layer), Business Rules(Business Logic Layer), Data Access(Data Layer) are separated in Layers, maintained and Developed Indipendently. The Applicatin will be broken into Tiers. Presentation Layer will be your Form or ASP.NEt page, Busines Layer will be the Classes that will Check if the Business Rules have not been Violeted, and the Data Access layer will Accept the Validated Data from the Business Logic layer and run the SQl commands on the Actual Database.

as you see in the figure below this is the Architecture of the N-Tier application
- Presentation Layer : contain all user interface and GUI , including ASp.net pages … etc
- Business Layer: contain all rules and class to manupliate the logaical of the application and communicate with the Data Access Layer
- Data Access Layer : here is where the Stored Procuder are , class that handle Data Base connection .
Have a Nice Day ^_^
:: C# Connect To MS Access Database ::
hi there
this a simple way to conect to MS access database using C#
first we need to use the :
// For MS Access
using System.Data.OleDb;
/// Decleaer a Connection String where Database2.mdb isyour database in the data directory
public static string connection = @”Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\Database2.mdb”;
//define a oledb connection with out connection string
OleDbConnection con = new OleDbConnection(connection);
// Define a dataset becuase here i used disconected model ADO.net
DataSet dbset= new DataSet();
//define a sql query string
string sql= “select * from table”;
// define a data adapter that retirve data
OleDbDataAdapter adr = new OleDbDataAdapter(sql, con);
// open the connection
con.Open();
// fill the data set from the data adapter
adr.Fill(dbset);
//So now all the data will be in the data Set
// Close the connection
con.Close();
//Enjoy
-
Archives
- October 2009 (5)
- June 2009 (2)
- March 2009 (1)
- January 2009 (2)
- December 2008 (1)
- November 2008 (2)
- September 2008 (10)
- August 2008 (3)
- June 2008 (2)
- May 2008 (1)
- May 2007 (11)
- April 2007 (3)
-
Categories
-
RSS
Entries RSS
Comments RSS
