Answered by:
convert ms access database to net

Question
-
User1026583345 posted
I developed a ms access database for my client several years ago, right now, I was asked to move the access to web. is it easy to learn .net using vs to do that? if yes,what's the learning material recommended?
thanks.
mike
Wednesday, July 3, 2019 11:50 PM
Answers
-
User-821857111 posted
is it easy to learn .net using vs to do that? if yes,what's the learning material recommended?It depends on your experience. The recommended version of ASP.NET is Razor Pages (https://www.learnrazorpages.com) but you need to know the basics of how HTTP requests and responses work. You also need to know HTML and CSS.If you are more comfortable working in a drag and drop design environment, you might want to consider using Web Forms instead (https://docs.microsoft.com/en-gb/aspnet/web-forms/). You will find it easier to use VB as a language in Web Forms, if you don't know any C type languages.
As others have mentioned, you can continue to use the mdb/accdb file in a web application, although this is not recommended. If you want to use an accdb file, you need to find a host that will install the ACE provider. Not many of them will. Otherwise, you could resave the db as an mdb file, so long as you aren't using any features that aren't supported in older versions of Access (pre-2007). You should consider migrating to SQL Server. There is a migration assistant that you can use for that: https://www.microsoft.com/en-us/download/details.aspx?id=54255.
None of the forms or modules in your current Access application are reusable in ASP.NET.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Thursday, July 4, 2019 7:04 AM
All replies
-
User71929859 posted
Hi,
MS Access is a database management system. You can very well use MS Access in web.
If you are developing using ASP.NET web forms you can check this - https://www.tutorialspoint.com/asp.net/asp.net_database_access.htm
Or you can Use ADO.NET
Thursday, July 4, 2019 1:25 AM -
User-1174608757 posted
Hi mikemda.
According to your description, you want to add ms database to web application. So you need to add connection between ms database and web application.
You could put db source file in application and add code in code behind to add connections to database as below:
OleDbConnection con = new OleDbConnection(); // establish connection con.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + Server.MapPath("LogInDatabase.mdb"); con.Open(); // connection open
Then in webform, it has many control, you could also use sqlserver control in front end to connect database, you could see as below:
add connection string configuration in web.config:
<connectionStrings> <add name="ConnectionString" connectionString="Provider=Microsoft.ACE.OLEDB.12.0;Data Source=D:\Test1.accdb" providerName="System.Data.OleDb" /> </connectionStrings>
in aspx we could call connection string in sqldatasource control:
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>" ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" SelectCommand="SELECT * FROM [Table]"></asp:SqlDataSource> <asp:GridView ID="GridView1" DataSourceID="SqlDataSource1" runat="server"></asp:GridView>
Here is the link , I hope it could help you.
https://www.c-sharpcorner.com/blogs/log-in-page-in-asp-net-using-access-database
https://stackoverflow.com/questions/11372422/how-to-connect-ms-access-db-with-my-asp-net-website
Best Regards
Wei
Thursday, July 4, 2019 2:27 AM -
User-821857111 posted
is it easy to learn .net using vs to do that? if yes,what's the learning material recommended?It depends on your experience. The recommended version of ASP.NET is Razor Pages (https://www.learnrazorpages.com) but you need to know the basics of how HTTP requests and responses work. You also need to know HTML and CSS.If you are more comfortable working in a drag and drop design environment, you might want to consider using Web Forms instead (https://docs.microsoft.com/en-gb/aspnet/web-forms/). You will find it easier to use VB as a language in Web Forms, if you don't know any C type languages.
As others have mentioned, you can continue to use the mdb/accdb file in a web application, although this is not recommended. If you want to use an accdb file, you need to find a host that will install the ACE provider. Not many of them will. Otherwise, you could resave the db as an mdb file, so long as you aren't using any features that aren't supported in older versions of Access (pre-2007). You should consider migrating to SQL Server. There is a migration assistant that you can use for that: https://www.microsoft.com/en-us/download/details.aspx?id=54255.
None of the forms or modules in your current Access application are reusable in ASP.NET.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Thursday, July 4, 2019 7:04 AM