The Connection String is used to Open Connection to the specified Sql Database
you can Copy it from Here
In Server Explore ,
Database Connection, You can see your Database
copy the connection string text:-
you can Copy it from Here
In Server Explore ,
Database Connection, You can see your Database
Right click on database and Click Properties
copy the connection string text:-
Past it to the con.connection string class Remove the C:etc\etc from Text And Fill Like this For Run Your application In Any Server
con.ConnectionString = "Data Source=.\\SQLEXPRESS;AttachDbFilename=|datadirectory|\\Database.mdf;Integrated Security=True;User Instance=True";
No comments:
Post a Comment