0

I'm creating a VB2010 application which will require a connection to MSSQL. Should I Install SQL 2008 on my computer then use MS SQL 2008 as my data source or skip installing SQL 2008 and use MDF instead?

Also the program must have the following requirement

  1. Program must use SQL as their database source
  2. End user must not install SQL server on their machine
  3. Program must be able to update (sync) the local SQL database from SQL server on the web. (User will have option to delete everything on their local database and load everything fresh from the server or to merge the update with existing data)
  4. Programs will (most of the time) run in an offline environment. When the user have access to internet they can update the database
  5. The program must allow user to add,edit, delete their local database while offline
  6. Only certain user (authorized user) can update their local database back to the serverC

Is it possible to created a program that meets all the above requirement ?

If yes, can you please clarify on how can I accomplish all points

Thank you very much

Joel Coehoorn
  • 399,467
  • 113
  • 570
  • 794
chmod
  • 129
  • 1
  • 1
  • 11

1 Answers1

0

use MDF instead?

An MDF file is Sql Server.

End user must not install SQL server on their machine

and

Program must be able to update (sync) the local SQL database from SQL server on the web.

In that case, I recommend Sql Server Compact Edition. It is upgrade compatible to full Sql Server, which will make sync operations easier, but it does not require you to install the full Sql Server engine to the local system.

Joel Coehoorn
  • 399,467
  • 113
  • 570
  • 794
  • for SQL Server CE, end user will still need to install it right? I need a solution that do not require end user to install or config anything. They should just download the program and run it. Nothing more. – chmod Mar 24 '12 at 19:58
  • In that case, your options are MS Access (the access engine is built into windows) and Sqlite, which allows you to include the engine with your source code. Neither option is directly upgrade compatible to sql server: both will require you to write some translation code. – Joel Coehoorn Mar 24 '12 at 20:04
  • Can I use MDF with the program? and replicate it with SQL Server on the web? or export the data from SQL server then import it locally? (download the .sql file then run it locally so that it updated the MDF on client machine) – chmod Mar 24 '12 at 20:12
  • You need Sql Server installed to be able to use mdf files. – Joel Coehoorn Mar 24 '12 at 20:43
  • OH.Thanks, I didn't know that. So the only way to integrate database with the application is to use Access? Is it feasible to write code to translate SQL to access? Or can I created an installer that will automatically install and config SQL Server Express. Will update from SQL server be possible now? – chmod Mar 24 '12 at 20:55
  • There is an alternative. LocalDB is SQLServer Express 2012 with easy steps to install. [SQL Server 2012 Express LocalDB](http://msdn.microsoft.com/en-us/library/hh510202(v=SQL.110).aspx). And look at my question [here](http://stackoverflow.com/questions/9655362/localdb-deployment-on-client-pc). However, you will need to provide an install procedure for your application. – Steve Mar 24 '12 at 21:03
  • Thanks Steve. How can I update (sync) the database in LocalDB and SQL Server? – chmod Mar 24 '12 at 21:27