JaedenRuiner
Well-known member
- Joined
- Aug 13, 2007
- Messages
- 340
- Programming Experience
- 10+
Well,
I've been using my system with SQLExpress for testing my application and development, but for deployment the Sql Server will be on a networked system.
that is the connection string I have been using for my test setup, and with a ConnectionStringBuilder() object, I am able to add in the User Name/Password at Run-Time in order to maintain security, etc.
However, my initial issue is with the "AttachDbFilename" parameter, which Frankly, I won't know Where the actual .mdf will be on the server, as well, many times (in the wizard at least) it won't let you attach to a "unc share path".
SO granted that I have the Datasource, (we'll say for the example its "MyServer\SQLEXPRESS") and the DataBase within that server is called "Rexamship" how would I format the connection string to connect to the right server/db without that AttachDbFilename parameter?
thanks
I've been using my system with SQLExpress for testing my application and development, but for deployment the Sql Server will be on a networked system.
VB.NET:
Data Source=.\SQLEXPRESS;AttachDbFilename=C:\db\rexamship.mdf;Initial Catalog=rexamship;Connect Timeout=30;User Instance=False
that is the connection string I have been using for my test setup, and with a ConnectionStringBuilder() object, I am able to add in the User Name/Password at Run-Time in order to maintain security, etc.
However, my initial issue is with the "AttachDbFilename" parameter, which Frankly, I won't know Where the actual .mdf will be on the server, as well, many times (in the wizard at least) it won't let you attach to a "unc share path".
SO granted that I have the Datasource, (we'll say for the example its "MyServer\SQLEXPRESS") and the DataBase within that server is called "Rexamship" how would I format the connection string to connect to the right server/db without that AttachDbFilename parameter?
thanks