web application development and database replication - asp.net

Good Afternoon at GMT +8
I have to deploy a project using ASP.net to create a online payslip viewer. the problem is, our network would not host the web app, it would be from a different network, which would be a web host.
My problem is the database, to view your payslip, you should have access to your database, and my answer is replication.
However, my constraint to this approach is we use SQL server 2000 as our DBMS. as i have read in this article
http://msdn.microsoft.com/en-us/library/ms151763%28v=sql.105%29.aspx
the instance was tagged under SQL server 2008, could there be a way to replicate using SQL SERVER 2000? or are there any more ways that i could view data from our database online? without any direct link to our network?
I would also like to know if there would be another approch in regards to creating a simple payslip viewer online.
thanks!

There are several options here:
If you can move your database to that other server that would be an ideal solution.
Can you connect to your database server from external network? How about some kind of VPN? If speed is the problem then this might not work.
Other solutions could be creating another database in your host environment where application would be deployed and use one of many database comparison tools to synchronize the data between two databases but this is far from ideal especially if your application writes/update a lot of data.
One more thing you can consider is creating some kind of web service that you can use to communicate to your database. In that case you wouldn’t need secondary DB.

Related

How to backup and restore a SQL Server database in an ASP.NET app and get the backup file from a web page?

I have an ASP.NET web app on a shared hosting server and a SQL Server database on a database server. I would like to backup and restore the database programmatically in the web app where the site owner can download/upload the backup file from a browser. Looking for a solution which works in medium trust. I think SMO (shared management objects libraries) requires full trust and not sure if it even meets my needs. Writing files on the database server, using a control panel or SSMS is not an option.
While I might be able to write SQL Scripts to do all this work, it's going to take some time to have it work reliably for any database. I was wondering if these kind of scripts or a suitable library is available.
Based on the shared hosting, and the desire to get backups on-demand, you may need to actually run a SQL query that essentially iterates all the metadata and raw data and generates a bunch of SQL INSERT statements.
The good news is, this is a well-solved problem. See this question: What is the best way to auto-generate INSERT statements for a SQL Server table? or just Google "SQL script generator". If you look at some of the open source projects out there, that might be the easiest code to integrate.
With the caveat, it might be worth giving your hosting company a call and just explaining your needs, especially if they are a smaller company. I used to be Dir of Engineering for a small web hosting company and we'd setup ad hoc solutions for folks all the time.

Can I access MS Access file as Database for ASP.NET site without SQL hosting plan?

I am creating a site with ASP.NET C#. Now my problem is I purchased one hosting plan without SQL database hosting, so can I use MS Access as my database for my site? I have taken hosting plan from net4.in.
Yes you can. Make sure you have the appropriate security access to the file - this can typically be done by putting the Access .mdb file in the App_Data 'magic' folder in ASP.NET. Update the connection string in your application configuration / web.config with the appropriate values.
Refer to connectionstrings.com for building / configuring the connection string.
Not all features available in SQL Server are available in Access and there might be slight changes to your queries / SQL syntax so make sure Access has everything you want before you go down this route - the extra cost of switching / upgrading your host will probably be less than modifying and retesting your code.
EDIT: ASP.NET also supports disconnected database MDF files in the App_Data - it might be worth checking with your host if they support this as you would not need to alter your code at all.
The short answer is yes, however I'd strongly recommend against it. The reasons for using Sql Server are limitless. Sql Server is much more secure and it performs better than Access when it comes to optimizing queries. The Sql Server Query Optimizer is remarkable in its ability to analyze the optimum route for pulling back data and is very efficient in preserving server resources.
However, if you are unable to pay the price for Sql hosting then you can certainly use Access. This article: http://www.aspfree.com/c/a/Microsoft-Access/Connecting-to-a-Microsoft-Access-database-with-ASPNET/ can help you get started... it is outdated, but it should get you on the right path for setting up the connection string to grant your application access to your MS Access data.
Thanks for all your answer but i tried by myself downloaded one sample application and uploaded on my server, and its working. So now i can use MS Access database on my server which is without SQL server hosting. As there was very small need for using database so i used MS Access here.

updating data of a distributed windows application

I'm wondering, is there a way to update databases of a windows application that is distributed on several computers all at the same time? is it done by using sql server? because I'm developing an examination system that will be distributed on several computers for students to take exams and I'm just wondering if an admin updates a questions database will the changes be applied to all other computers as well or should it be done manually? sorry if I sound stupid but I can't seem to understand this part of my work, I was thinking about switching to a web app since it seems easier, but again this data updating issue is giving me hard time.
by the way I might link the application to an internal network, will this have anything to do with updating the databases?
please I need some explanation here :|
I think you don't need multiple databases with each client. Your application is going to be a client/server architecture. You will have a server application which will be dealing with the database of the questions. You will also have a separate client application which should request questions from the server. You can use web services or any other form to communicate to the server. Once you get the questions on the client then your client application will record all the answers and submit it back to the server.
On your server side application, any administrator can update the questions and client will get the updated questions

How to sync two ASP.NET Membership databases

I have a local and an azure ASP.NET Membership database. I need to be sync them both. Wondering if anyone has found a easy way to do this? The table structure seems simple enough but would rather pull from azure than push. Is there a routine or tool I do not know about to do this by now?
Thanks
-Ken
This would be a suitable job for the Microsoft Sync Framework.
You create a service or scheduled task that makes the necessary calls. Have this running on your server and you can pull from the Azure database and sync with the local one. It can be set up to sync one way or two ways.

Migrate Access to ASP.NET

The current application is a kind of CRM application built upon MS Access. The application is for internal use. My job is to migrate it to ASP.NET web-based application. Now boss requires to keep Access as database and develop ASP.NET code against it.
My question is, is there any disadvantages of using Access as database in ASP.NET application? (e.g. optimistic concurrency issue?) Should I persuade boss to upgrade Access to MS-SQL?
Many thanks!
We've used Access as a backend for web sites with good success. It's cheap, can be used effectively by moderately skilled programmers, and you can store the MDB on a document server so it gets backed up.
Most IT people dislike Access, but from a business perspective, Access can be very valuable.
MS Access is notoriously unstable in multiuser environments. A WEB app is by definition heavily multi-user.
So IMHO leaving MS Access as underlying DB is a call for trouble. At least use SQL Express (it is free)
The problem you are going to face in upgrading from Access to MS-SQL is that there is a major cost investment for the application. If your company already has the infrastructure in place(licensing, hardware...) then you won't have such a hard fight to pursuade your boss.
As for a technical answer:
I'd say you need to let you boss know that access databases aren't ideal for concurrent usage which a web application suggests is the intended goal of the application. My view is that Access is for database information that a SMALL set of users will be simply using for small data entry and querying. NEVER use Access to build an enterprise-level solution.
If you are planning to upgrade a Microsoft Access database to SQL Server 2008, use the SQL Server Migration Assistant (SSMA) rather than the upsizing wizard built into MS
10+ tips for upsizing an Access database to SQL ServerAccess.
Your boss probably likes to do ad-hoc stuff with access / excel. If you move the DB to SQL Server Express you can use Access and it's linked table feature to let your boss keep doing his ad-hoc needs through Access while keeping the data in SQL Server Express. If you keep the linked tables named the same as the old physical ones all his reports and queries will should keep working.
I'm an Access promoter, but not for use on websites because Jet/ACE is not threadsafe (though Michael Kaplan once said that is is threadsafe if you access it via ADO/OLEDB; I don't quite understand how a database abstraction layer can wash away a characteristic of the underlying database engine it's calling, but if MichKa said, it's 99% likely to be true).
Now, the exceptions would be if you're using it for prototyping something that will use a different database, or if it's read-only, or is read-write but will only ever have a very small number of users.
Michael Kaplan's website, trigeminal.com, used to use a Jet database as the back end (it may still -- I don't know that MichKa ever changed it), and when that was his main website he reported getting 100K hits a day. But it's a read-only site, so fits my restrictions.
There are so many different alternatives and they are mostly easy to use that I just don't see the point of trying to use Jet/ACE as back end for a website. I'd never do it myself (all the websites I'm responsible for use MySQL).
Simply put, go with MSSQL. Express edition is free, and will give you everything you need to migrate away from Access. These articles are talking about Access applications specifically, but the same issues will plague you.
http://resources.zdnet.co.uk/articles/features/0,1000002000,39285074,00.htm
https://web.archive.org/web/1/http://techrepublic%2ecom%2ecom/5208-6230-0.html?forumID=102&threadID=205509&messageID=2136367

Resources