visual studio 2013 - connect to DataBase .mdf (Class Labrary) from web app -
i want connect db .mdf web application located in classlabrary project.
when write:
private const string url = @"data source=(localdb)\v11.0; attachdbfilename=*full path*; integrated security=true";
it works.
but when write:
private const string url = @"data source=(localdb)\v11.0; attachdbfilename=|datadirectory|\localdb.mdf; integrated security=true";
it doesnt work.
the error : "an exception of type 'system.data.sqlclient.sqlexception' occurred in system.data.dll not handled in user code"
i want connectionstring not specific on 1 computer. have suggest how can solve it?
the project locate under same solution works on visual studio 2013 thanks
Comments
Post a Comment