|
I am currently trying to connect to a database with visual basic and it keeps bring up an error saying it cant connect her is the connection code
|
|
Is it possible to get this SDF file into an actual database server? Most connectionstrings look like this:
If not, try playing around with your Data Providers, which should be a property of your connection object. Also, is |DataDirectory| a literal string or are you substituting that for where your SDF file is actually located? |
|
SDF files are files created by SQL Server. I suggest working out how to import that file into SQL server, and changing your Source= to the servername as suggested by tsilb. |
|
Just a detail is the string variable was declared as "connetionString" (with no "c"), and it was used as "SqlConnection(connectionString)", with "c". |
