Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


Question regarding network use of an sdf database

Question regarding network use of an sdf database

Question regarding network use of an sdf database

I'm looking for advice on how to proceed from here.  I have a bit of a background in VB6 - recently made the jump to VB2008 and would like to see what you would suggest be the best way to handle these questions.

The current program I am writing will eventually need to be deployed in an office environment, and will need to be accessed by 3-5 people (at points concurrently).  In VB6 I used an Access database, however with my current program I have switched to an SQL Server 3.5 compact database file.

Question #1:
If I have a shared folder on our network (for the sake of this we will call it the "sharedwitheveryone" folder - would I simply place the .sdf file in that folder for everyone on the network to access?

Question #2:
Since I am developing the program off-site, how would I go about telling the program where to look for the database file?  I have seen in the app.config file a line called connection string, and while looking at the line it appears that it has something to do with the eventual placement of the database file, but I"m a little too green to want to tinker with the settings there just yet.

Question #3:
If I need to back-up my data - is it simply a matter of making back-up copies of the .sdf file?

Question #4:
What else would you suggest that I keep in mind while developing this program based on it's eventual destination?

Any answers the questions above would be GREATLY appreciated!

Thank you in advance for your help!

Rich H

RE: Question regarding network use of an sdf database

my question to you is... why bother with the compact edition?  I mean, you can use SQL Express 2008 instead.  The compact edition has some restrictions that can be difficult to deal with.

SQL Express is free.  Simply download it and install it.  You can easily use vb.net to connect to sql express.  The way it would work is...

You install the database engine.  This installs as a service so as long as the computer you are running the database on is powered on, any and all clients would be able to connect to it.

You can install SQL Express on a desktop, it does not need to be a server.  It's best if this computer has lots of ram because SQL is a bit of a memory hog, but that's really to your benefit because it speeds up data access.

When your clients connect, they need to know the computer name or the computer's IP address.  SQL Express usually connects through tcp/ip ports.  This means you do not need to have a shared folder.  If the computer running the database engine has a firewall running on it, you will need to configure it to allow the port that SQL Server uses (default is port 1433).

There are various ways to configure the client computers.  Usually I create a small configuration file (simple ASCII file) to store the server name and usually the user name of the last user that connected.

Backups are simple.  With SQL Standard, there is a SQL Agent that runs scheduled SQL jobs.  SQL Express does not have this.  Instead, you create a simple backup query and run it using SQLCMD.  You schedule this with windows task scheduler.

SQL Compact was written specifically to run on hand-held computers where storage space is very expensive.  To minimize install space, Microsoft removed a lot of functionality which makes dealing with this type of database much more difficult.  Since this is not a concern for desktops (where hard drive space is cheap), you really shouldn't impose these restrictions if you don't need to.


"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close