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

Recommended Answers

All 8 Replies

Member Avatar for iamthwee

Get a book or read a tutorial.

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

There goes the learning process..

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.