I developed winform project VS c# 2010 with SQL server 2008. My side project working
properly, My client system getting error message showing bellow.
Database 'C:\PROGRAM FILES\DEFAULT COMPANY NAME\TTCS SETUP\TTCSSQL.MDF' cannot be
upgraded because it is read-only, has read-only files or the user does not have
permissions to modify some of the files. Make the database or files writable,
and rerun recovery.
An attempt to attach an auto-named database for the C:\Program Files\Default
Company Name\TTCS Setup\TTCSSQL.mdf failed. A database with the same
name exists, or specified file cannot be opened, or it is located on UNC share.
Below connection I am using my project.
<add name="TTCS" connectionString="Data
Source=.\SQLEXPRESS;AttachDbFilename="|DataDirectory|\TTCSSQL.mdf";Integrated
Security=True;Connect Timeout=30;User Instance=False"
providerName="System.Data.SqlClient" />
I create setup file included TTCSSQL.mdf file. When I install client
system c drive automatically created TTCSSQL.mdf but did not work.
Bellow code is login form code.
public TTCS()
{
InitializeComponent();
}
SqlConnection cs = new
SqlConnection(ConfigurationManager.ConnectionStrings["TTCS"].ConnectionString);
What I have tried:
I developed winform project VS c# 2010 with SQL server 2008. My side project working
<add name="TTCS" connectionString="Data
Source=.\SQLEXPRESS;AttachDbFilename="|DataDirectory|\TTCSSQL.mdf";Integrated
Security=True;Connect Timeout=30;User Instance=False"
providerName="System.Data.SqlClient" />
I create setup file included TTCSSQL.mdf file. When I install client
system c drive automatically created TTCSSQL.mdf but did not work.
Bellow code is login form code.
public TTCS()
{
InitializeComponent();
}
SqlConnection cs = new
SqlConnection(ConfigurationManager.ConnectionStrings["TTCS"].ConnectionString);