How to connect MSAccess database in ASP.NET

Please support our C# advertiser: Intel Parallel Studio Home
Reply

Join Date: Apr 2007
Posts: 2
Reputation: rahilameen is an unknown quantity at this point 
Solved Threads: 0
rahilameen rahilameen is offline Offline
Newbie Poster

How to connect MSAccess database in ASP.NET

 
0
  #1
Apr 21st, 2007
hi i am a new memeber of this group.
i am developing a web application which inserts customers details into databse when customer inserts his details on the web page.
i need help regarding code to connect MSAccess database in ASP.NET.means if user inserts the details the details should get saved in the database under respective colums of the table.if any one know the code,please help me.
waiting for reply,
thanks and regards,
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 5,264
Reputation: iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold iamthwee is a splendid one to behold 
Solved Threads: 377
Featured Poster
iamthwee's Avatar
iamthwee iamthwee is offline Offline
Posting Expert

Re: How to connect MSAccess database in ASP.NET

 
0
  #2
Apr 21st, 2007
Get a book or read a tutorial.
*Voted best profile in the world*
Reply With Quote Quick reply to this message  
Join Date: Apr 2004
Posts: 759
Reputation: Killer_Typo will become famous soon enough Killer_Typo will become famous soon enough 
Solved Threads: 35
Killer_Typo's Avatar
Killer_Typo Killer_Typo is offline Offline
Master Poster

Re: How to connect MSAccess database in ASP.NET

 
0
  #3
Apr 26th, 2007
Dont forget to spread the reputation to those that deserve!
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 2
Reputation: danidev is an unknown quantity at this point 
Solved Threads: 0
danidev danidev is offline Offline
Newbie Poster

Re: How to connect MSAccess database in ASP.NET

 
0
  #4
Oct 25th, 2008
Use data access layer to execute sql query
see following
http://urenjoy.blogspot.com/2008/10/...-msaccess.html
Update your database name, Pass query and execute it.
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 172
Reputation: Jugortha is an unknown quantity at this point 
Solved Threads: 16
Jugortha Jugortha is offline Offline
Junior Poster

Re: How to connect MSAccess database in ASP.NET

 
0
  #5
Oct 27th, 2008
Here is a code to do that

public void ConnectToAccess()
{
System.Data.OleDb.OleDbConnection conn = new
System.Data.OleDb.OleDbConnection();
database. conn.ConnectionString = @"Provider=Microsoft.Jet.OLEDB.4.0; Data source= @"path \AccessFile.mdb";
try
{
conn.Open();
// Insert code to process data.
}
catch (Exception caught)
{
MessageBox.Show(caught.Message);
}
finally
{
conn.Close();
}
}
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 1,735
Reputation: LizR has a spectacular aura about LizR has a spectacular aura about 
Solved Threads: 186
LizR LizR is offline Offline
Posting Virtuoso

Re: How to connect MSAccess database in ASP.NET

 
0
  #6
Oct 27th, 2008
There goes the learning process..
Did I just hear "You gotta help us, Doc. We've tried nothin' and we're all out of ideas" ? Is this you? Dont let this be you! I will put in as much effort as you seem to.
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 3
Reputation: ketanbece is an unknown quantity at this point 
Solved Threads: 0
ketanbece ketanbece is offline Offline
Newbie Poster

Re: How to connect MSAccess database in ASP.NET

 
0
  #7
Oct 29th, 2008
Hello There

First Open Web.Config of your Application and Write Down Following Code in Web.Config File.

in appSettings tag
add key="constr" value="Provider=Microsoft.Jet.Odbc.4.0;DSN=resume;User Id=admin;Password=admin;"

end appSettings tag

Now open your Application and write down following Connection String

OdbcConnection Objcon = new OdbcConnection(ConfigurationManager.AppSettings["constr"]);

You Get More Details on Connection String in ASP.net

ASP.net Discussion
Reply With Quote Quick reply to this message  
Join Date: Oct 2009
Posts: 2
Reputation: prashantpani is an unknown quantity at this point 
Solved Threads: 0
prashantpani prashantpani is offline Offline
Newbie Poster
 
0
  #8
Oct 16th, 2009
thank u dear
Reply With Quote Quick reply to this message  
Reply

Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC