1

I am developing a simple database desktop application using windows forms and c#. I have decided to use Sql Server CE for my app. I am using following things: 1) Sql server ce 4.0 2) .net framwork 4.0 3) ms visual studio 2010

Now sorry but I have a thousand questions to ask 1) Is my choice of sql server ce correct or what are the alternatives

2) Basically i have developed apps on android and there i dont need to check if the database is already created or not but here in forms apps, do i need to: a) check if the database is already created b) then check if all tables have been created c) can i do the above two steps( a and b ) just by checking if my sdf already exists and be rest assured

3) Do I need to have .net installed on my client's pcs or my app is a stand alone one( because i used sql server ce - no sql server installation)

Buddies these all questions have made me puzzled. Please help and share your experiences.

Cheers and thanks in advance!!!

tarun_tenniso
  • 214
  • 5
  • 20

3 Answers3

2
  1. Depends on the nature of your program. Understand that SQL CE is most suitable for deployed client applications as SQL CE can be privately deployed.

  2. When your program first loads, you should check if the database file already exists. If the database does not exist you should create the database and create the appropriate tables like this.

  3. The client machine must have the net framework installed! In addition, you will either have to require that the end-user has a public installation available or privately deploy the appropriate class libraries with your applications.
Community
  • 1
  • 1
User 12345678
  • 7,714
  • 2
  • 28
  • 46
1

1) It is correct

2) c) should be enough - just create your db when there is no sdf - as long as the tables are always the same it is ok.

3) Yes because you're developing a .NET application. Use of SQL CE does not change anything. Your client machines will need .NET 4.0 installed. SQL CE itself doe not have to be installed - you need to include all the SQL CE files within your app. All files needed are in the 'private' folder in the SQL CE package.

1

1) Is my choice of sql server ce correct or what are the alternatives

I would say it depends on your need or requirement. But SQL Server CE has limitations specially you can store upto 4GB data. So before choosing the database think of your need.

2) forms apps, do i need to: a) check if the database is already created b) then check if all tables have been created.

Not necessary, But during the database operations if those are not available you can display message.

3) Do I need to have .net installed on my client's pcs or my app is a stand alone one( because i used sql server ce - no sql server installation)

Yes, Client machine should have .net frame work installed. But .net frame is packed with windows OS. But you have to make sure right version is available. If you are building MSI package it will do it for you, It can check .net frame work version exist in the client machine.

Kurubaran
  • 8,696
  • 5
  • 43
  • 65