Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

asp.net developer trying to do first desktop app - advice needed

Posted on 2011-10-03
12
Medium Priority
?
197 Views
Last Modified: 2012-08-13
Hi guys

I've been an asp.net dev for some time now.
I've written a console app with a bit of hand holding once but apart from that everything I've done has been web based

I've been asked to develop a desktop app for a microfinance org in a slum
They won't have net access but have 3 sites and need to backup the data everyday
They could have net access using a dongle every evening to just upload the daatabase

I have no idea on the best approach
If I use SQL server express I'd like to be able to easily backup the data
Can it be done.via the web and/or via USB drive?

Can someone please explain the rough artictecture of this system based on the above
please bear in mind all I know is asp.net web development

I once read an article on disconnected data sets but not sure this is relavent here

Just to reiterate, they have 3 sites all with different data (same structure though)  and it needs to be backed up via USB/internet everyday as there is a good chance.the laptops will get stolen
Using a constant internet connection isn't an option

Also could I do it like a web app? And just run it locally?
I need to factor in deploying new versions of code and for it to be done without me being there

Thanks for your ideas and insights
0
Comment
Question by:websss
  • 6
  • 5
12 Comments
 
LVL 16

Expert Comment

by:Easwaran Paramasivam
ID: 36908119
Well. You can implement windows service to perform tha backup operation. Timer control can be used to run the backup process at the specified interval.

Even database operations such as Backup and restore will be supported by .NET Framework Classes. Refer SqlBulkcopy and so on.

I gave only the way to go. Please refer more articles in that particular topics and go on. Good luck!!
0
 

Author Comment

by:websss
ID: 36908373
Thanks, I'm looking for a solution that will allow non technical users to do this

How does your solution fit in this this category?
0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 36909912
SQL Server allows you to backup a database using both TSQL and SQL Management Objects

TSQL

http://msdn.microsoft.com/en-us/library/ms186865.aspx

SMO

http://msdn.microsoft.com/en-us/library/microsoft.sqlserver.management.smo.backup.aspx


You can provide this functionality within your app to create the backup files which the user can then either copy to USB or upload via web.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:websss
ID: 36910359
So does it Produce a .Bak file?
How about deployement of new versions? Do I have to use an installer?
0
 

Author Comment

by:websss
ID: 36910569
So could the app generate a backup file, and then take it to one of the other laptops and import the. File?
0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 36911139
Yes. It produces a backup file which can be restored later. But are you sure you want backup/restore and not sync?
0
 

Author Comment

by:websss
ID: 36912326
Can you sync via a file on USB drive?
Is.syncing harder to develop than a straight backup?

What are the disadvantages on syncing and some areas to avoid/look out for?
0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 36912343
Syncing would be bit complex and I dont think it can be done on files. It all depends on your requirements though. Syncing would be need if data is being entered at multiple sites and needs merging.
0
 

Author Comment

by:websss
ID: 36915173
Hi

Just to re-iterate

3 sites all running same desktop app
daily backup onto pen drive will then goto 1 central computer
this central computer will import all 3 backups from different sites

the central computer will then generate reports on the data as and when its needed
all data will be stored in database.

when i do restoring in SQL express it asks me to replace all data or to merge (i think) would this feature be enough....and can it be done in code?
0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 36915992
I think you should take the route of import/export rather than backup/restore. Export from source computers into something like xml/excel/access/csv etc and then import at the central computer.
0
 

Author Comment

by:websss
ID: 36916007
ok thanks

how would it handle duplicates?

or would i just overwrite everything

the bit i get confused with is the 3 sites,
i.e. there have to be 3 imports to get all the data into the database, and there will be existing data that will need to be updated

0
 
LVL 83

Accepted Solution

by:
CodeCruiser earned 2000 total points
ID: 36916022
That is why I mentioned syncing but the trouble is that syncing works when the databases are connected. One possibility is that you create three temp databases in the sql server and import each site data to these databases. Then you run a sync between the master database and each of these site databases one by one on the same server.

http://www.simple-talk.com/sql/database-administration/sql-server-replication-crib-sheet/
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
In real business world data are crucial and sometimes data are shared among different information systems. Hence, an agreeable file transfer protocol need to be established.
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Loops Section Overview
Suggested Courses
Course of the Month21 days, 5 hours left to enroll

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question