connctionstring
-
Hi Please somebody help me. I need a connectionstring for c#windows application that connect to my database(my database near exe files in bin)without attach my database in microsoft sql 2005.
An SQL Server database must be attached to an SQL Server in order to access it. There are databases don't rely on a server, you could try one of those, but I don't recommend it. Why don't you want to attach it? You could attach it only for the duration of your application.
-
Hi Please somebody help me. I need a connectionstring for c#windows application that connect to my database(my database near exe files in bin)without attach my database in microsoft sql 2005.
-
Hi Please somebody help me. I need a connectionstring for c#windows application that connect to my database(my database near exe files in bin)without attach my database in microsoft sql 2005.
There's two items: your database, and a database-server. You can only manipulate databases that are (temporarily) attached. You can talk to a database-file after you informed the server where the file is located. Try something like this;
Server=.\SQLExpress;
AttachDbFilename=|DataDirectory|\myDatabase.mdf;
Database=DatabaseAlias;
Trusted_Connection=Yes;The "AttachDbFilename" makes sure that you can access the database-file without having to "attach" it. Good luck :)
I are Troll :suss:
-
Hi Please somebody help me. I need a connectionstring for c#windows application that connect to my database(my database near exe files in bin)without attach my database in microsoft sql 2005.