c# - Showing Data with SQL Database Error -
i try data local sql database. 1st code workis simple , write path directly.
string connstring = "data source=(localdb)\\mssqllocaldb;attachdbfilename=c:\\****\\****-\\desktop\\mssolution\\mssolution\\datatt.mdf;integrated security=true";
after research change code :
static string apppath = path.getdirectoryname(application.executablepath); string connstring = "data source=(localdb)\\mssqllocaldb;attachdbfilename=" + apppath + "\\datatt.mdf;integrated security=true";
but problem it's not showing data. , question, app deploy exe setup, problems working local database
<connectionstrings> <add name="contextname" connectionstring= "data source=.; database=dbname; integrated security=true" providername="system.data.sqlclient" /> </connectionstrings>
is looking for...?
Comments
Post a Comment