Question Questions regarding deploying a SQL database with app.

kiln23

New member
Joined
Oct 5, 2015
Messages
1
Programming Experience
1-3
Hi guys.

I am new to SQL and I have a few silly questions I'm wondering about.

I am a C# developer and have thus far only worked with access, .mdb files.

Let's say you develop some software for a client. It;s to be loaded on a few workstations and they need to connect to a central database.

When you use an .mdb file its pretty straight forward.

But how will you handle it if it's SQL? Do you normally install SQL express on the server and just set the connection string in the software on the workstations. I've never heard of an easier way to get the SQL database up and running and available to be connected to. As far as I know you can't connect to a SQL database file like with an mdb file

Please help me understand a little bit better?
 

jmcilhinney

C# Forum Moderator
Staff member
Joined
Apr 23, 2011
Messages
3,903
Location
Sydney, Australia
Programming Experience
10+
SQL Server is, as the name suggests, a server-based database. As such, you need a database server installed somewhere. It could be on one of the workstations, as long as it will be running whenever any of the others are, or a dedicated server machine. It can be the full, paid-for edition or SQL Server Express. Note that if you use the Express edition then databases cannot exceed 10 GB.

The two most common ways to deploy a SQL Server database are take a backup on your development system and then restore that on the server and to either write a SQL script or generate one from your development system and then execute that on the server.

Once the database is in place, you can connect to it from anywhere by simply specifying the server name and optionally the instance name in the connection string.
 

JuggaloBrotha

Staff member
Joined
Apr 23, 2011
Messages
177
Location
Lansing, MI; USA
Programming Experience
10+
Hi guys.

I am new to SQL and I have a few silly questions I'm wondering about.

I am a C# developer and have thus far only worked with access, .mdb files.

Let's say you develop some software for a client. It;s to be loaded on a few workstations and they need to connect to a central database.

When you use an .mdb file its pretty straight forward.

But how will you handle it if it's SQL? Do you normally install SQL express on the server and just set the connection string in the software on the workstations. I've never heard of an easier way to get the SQL database up and running and available to be connected to. As far as I know you can't connect to a SQL database file like with an mdb file

Please help me understand a little bit better?
Actually connecting to Sql Server isn't much different than MS Access, you create a Sql Server connection string then use the System.Data.SqlClient namespace instead of System.Data.Oldedb
 
Top Bottom