:: Think Code Execute ::

Think Code Excute

:: Online Asp.net IDE ::

CodeRun : is an online IDE to compile and debug Asp.net Application

Read more »

October 25, 2009 Posted by eshbeata | :: Asp.net :: | , , , , | No Comments Yet

:: 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.

 

n-tier

as you see in the figure below this is the Architecture of the N-Tier application

 

  1. Presentation Layer : contain all user interface and GUI , including ASp.net pages … etc
  2. Business Layer: contain all rules and class to manupliate the logaical of the application and communicate with the Data Access Layer
  3. Data Access Layer : here is where the Stored Procuder are , class that handle Data Base connection .

Have a Nice Day ^_^

March 4, 2009 Posted by eshbeata | :: Asp.net :: | , , , | No Comments Yet

:: 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

November 28, 2008 Posted by eshbeata | :: Asp.net :: | , , , | No Comments Yet