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

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();
}
}

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

hi, i am newly joined in this group.

I need sample codes for connecting the oracle database with .net.
If possible pls provide step by step.


thanks.
M.Subash
riaydh

This article has been dead for over six months. Start a new discussion instead.