DB included in source? Need SQL server?

Cheetah

Well-known member
Joined
Oct 12, 2006
Messages
232
Programming Experience
Beginner
Hi there,

I am sure this a stupid question but if i create an application and use a sql database in it, i can save that whole project onto a usb drive and develop it on a different pc can't I? The database isn't in some way saved to the server or something?

I don't know why, but i am under the impression you need SQL Server to run an application that has a sql database in it, but surely that can't be?

Can someone clear this up for me?

Thanks.
 
if i create an application and use a sql database in it, i can save that whole project onto a usb drive and develop it on a different pc can't I? The database isn't in some way saved to the server or something?
If the database is among the source files for the project you're fine. You can see the db file listed in Solution Explorer (dbname.mdf)
If the db file isn't there it's elsewhere and you may have an option to copy it to project. When you create a new connection you're asked if you want to copy the db to solution and modify the connection string to reflect this.

I don't know why, but i am under the impression you need SQL Server to run an application that has a sql database in it, but surely that can't be?
You sure do, SQL Express is sufficient. When deployed this is among the prerequisites.

Please provide a meaningful title when you start a new thread, "stupid question" is not in any way related to the topic of your request. I have renamed it now.
 
You sure do, SQL Express is sufficient. When deployed this is among the prerequisites.

Please provide a meaningful title when you start a new thread, "stupid question" is not in any way related to the topic of your request. I have renamed it now.

I take it that its the same if i use an Access Database? So if I try to run the application in a environment that doesn't have SQL installed, it take it that it would give me some sort of .NET exception?

(Sorry about the title - noted for the future)
 
Access is not a database server, but it does require Microsoft Data Access Components (MDAC) which is already installed on all XP/Vista systems.
 
Cheetah, The primary difference between Access database and SQL is the fact that with Access you have a localized Database that can be accessed from the same machine the client software is installed on. Where as with SQL you have a centralized (usually singular) database the client accesses from a remote PC that the Database is not stored on. The drawback to Access is information modified on the database on the particular machine you are working on will not change on say a second PC running the same software in another room. You can of course create a singular Access database to store on one machine and and have several different pc connect to it through a networked environment, but I don't believe it was designed to operate smoothly under that type of circumstance. SQL allows for more security when dealing with accessing and modifying information from a main database that once modified effects all PC's on the network. :)
 

Latest posts

Back
Top