TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Bilal Malik
NA
9
12.4k
Publishing problem of Path to database
Jan 13 2011 9:32 PM
Hi All,
I am new to C# programming.I have developed an application in C# that involves data retrieval from database, for which i used custom connection string as default one was not saving data permanently in database.
I am using MS Visual C#2010 Express.
so my code for connection was:
string conString = "Data Source=.\\SQLEXPRESS;AttachDbFilename=C:\\Users\\PC\\Documents\\Visual Studio 2010\\Projects\\My_app\\My_app\\Myapp_records.mdf;Integrated Security=True;User Instance=True";
SqlConnection con = new SqlConnection(conString);
con.Open();
and so on.....
Now when i want to publish this application and run on some other pc, it cannot find path to my database and gives error.
Error:
An attempt to attach an auto-named database for file ****** myapp_records.mdf failed.
can Please some one recommend me solution so that, i can install my application on other PC's with database attached. or path to database can be mentioned in settings some where.
Thanks
Bilal Farooq
Reply
Answers (
9
)
Update Progress should be on screen or shown unless time_tick event get stoped
aspx page get hanged with update panel and timer