0

I am using SQL Server DB. The connection string is

Data Source=office1\SQLEXPRESS;AttachDbFilename=|DataDirectory|\dbSQLTest.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True

On local computer it is fine. On the network computer, it gives "Invalid Key for attachdbfilename"

I do not want to make server client application. My purpose to use Sql server DB is to run my application on 3-4 computer simultaneously. I just make shortcut from my main computer to the network computers.
The reason why I donot attach with server instance is that it is difficult for the users to attach DBs with server and then manage SSMS. Please advise Thanks Furqan

KV Prajapati
  • 93,659
  • 19
  • 148
  • 186
Furqan Sehgal
  • 4,917
  • 33
  • 108
  • 167

2 Answers2

0

AttachDbFilename is used with local database. If you have remote database then the connection string will be different. Have a look at article - How to configure SQL Server 2005 to allow remote connections.

KV Prajapati
  • 93,659
  • 19
  • 148
  • 186
0

I'm not sure I am understanding you correctly, but you can't simultaneously attach the same MDF on a network drive by several concurrent users (like you can do with MS Access).

Rather just install SQL Express on a central computer and open it up for remote TCIP/IP access, and change the connection string to an IP / instance one.

Community
  • 1
  • 1
StuartLC
  • 104,537
  • 17
  • 209
  • 285