Last post Jul 04, 2019 07:04 AM by Mikesdotnetting
Jul 03, 2019 11:50 PM|mikemda|LINK
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?
Jul 04, 2019 01:25 AM|Ruchira|LINK
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
Please 'Mark as Answer' if this post helps you
Jul 04, 2019 02:27 AM|Wei Zhang|LINK
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:
<add name="ConnectionString" connectionString="Provider=Microsoft.ACE.OLEDB.12.0;Data Source=D:\Test1.accdb"
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.
Jul 04, 2019 07:04 AM|Mikesdotnetting|LINK
is it easy to learn .net using vs to do that? if yes,what's the learning material recommended?
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.