Is there a difference between sql server connection string and the express vesion?!
By default (though I don't recommend it1), Sql Express is installed as a named instance. That means you must connect like Server=servername.com\SQLEXPRESS
as opposed to just Server=servername.com
.
As always, connectionstrings.com has the goodies.
1 I don't recommend named instances because they run on a different port, which makes firewalling a PITA. Also, it makes little sense to me to run more than 1 MSSQL Server on a computer when you could just host multiple databases instead - so I'm not really sure what the point is.
Yes there is a difference- the big one being you won't have AttachDbFilename in the full SQL Server.
SQL Server Express connection string:
Server=.\SQLExpress;AttachDbFilename=c:\mydbfile.mdf;Database=dbname; Trusted_Connection=Yes;
Typical normal SQL Server connection string:
Data Source=myServerAddress;Initial Catalog=myDataBase;Integrated Security=SSPI;
See connectionStrings.com for more info.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With