Respected Experts
I have done 2 windows application and used following connection sting in first one to deploy application to client side so that we need not to install database to client side here dm=folder name in which i am putting .mdf file of my hm database, it is running successfully
dm folder is in set up project and copying mdf files after stopping service of sql server, in this project only forms are here
"Data Source=.\\SQLEXPRESS;AttachDbFilename=" +Application.StartupPath + "\\dm\\hm.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True"
but when same i am trying to do in another windows application in which there is datalayer class(class library) it is giving problem
please help me out to find solution , i have also run thread for same problem before months and also on various forums but still not satisfied
please help me out
Loading

Mayur GujrathiPosted Jun 16, 2011, 3:28 AM
i did as you said i copied .mdf and .ldf files of database in bin/debug folder of my application and used the connection string given by you then application runs fine but now i am getting new error while running and after creating set up file.I copied .mdf file and .ldf file in set up project and also in bin/release folder and then total application runs fine but now i am getting error in crystal report asking for user name and passwords
please suggest me for the same
Suthish NairPosted Mar 29, 2011, 4:26 PM
Hope you are using App_Data directory for DB storage then,
Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\hm.mdf;Integrated Security=True;User Instance=True
or
Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\dm\hm.mdf;Integrated Security=True;User Instance=True