Home >
Programmer2Programmer.NET Forum>
ASP.NET, MVC and Web Development >> How to Use MS access in Back end in Asp.net with C#...
NOTE : Log In required to post Replies for this discussion.
How to Use MS access in Back end in Asp.net with C#
|
Jitender Badoni
|
Posted: Tuesday 05, April 2011 04:54:03 PM
|
|
Dear Sir,
I want to know that how to use MS Access as back end in the asp.net with c#.
Please tell me the full procedure of that how to save? how to Delete? how to Retrieve? All of that
Please Reply me As Soon As Possible
|
Back to Top
^ |
|
Jitender Badoni | Posted: Tuesday 19, April 2011 12:11:50 PM | | I got the Answer from MSDN i need to use
OleDbConnection con=new OleDbConnection("ConnectionString"); con.Open(); OleDbCommand cmd=new OleDbCommand("select * from TableName",con ); OleDbDataReader dr=cmd.ExecuteReader(); GridView1.DataSource=dr; dr.DataBind();
| Back to Top ^ | | |
JohnBhatt | Posted: Thursday 17, May 2012 03:51:02 PM | | ASP.NET has wide support of Databases. Below is Code for Using MS Access 2007 database with Visual Studio 2010.
First Include a Namespace in your .cs page.
using System.Data.OleDb;
Then When you need make a connction like below:
OleDbConnection con = new OleDbConnection("ConStr"); string ConStr = "Provider = microsoft.jet.oledb.4.0, so urce=d:\\SampleDatabase.mdb"; OleDbDataAdapter adp = new OleDbDataAdapter("select * f rom tableSample", con);
Rest Same.
| Back to Top ^ | | |
|
Home > Programmer2Programmer.NET Forum >ASP.NET, MVC and Web Development >> How to Use MS access in Back end in Asp.net with C#...
|