I've been using a SQLCE database for some of my smaller projects, but decided to use a normal SQL database for a new project that is going to contain a large amount of information.

Since I realize that the connection strings for a SQLCE database and a SQL database, I decided to go to connectionstrings.com to find out what needs to be used for SQL.

I found this:

SQL Code:
  1. Data Source=myServerAddress;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword;

Although it does give me the proper string, it doesn't really give a good explanation of how to apply it.

Originally, I tried setting the Data Source to the location of my database, which is local for now. Then I set the Initial Catalog to my database name. There isn't a password or user ID for the database so I didn't include those:

VB.NET Code:
  1. Dim connection As New SqlConnection("Server=C:\Users\Ernest\Desktop\; Data Source=dbCredentials.mdf;")

Any ideas on what I'm doing wrong?

Thanks