0

I have built my database in SQL Server 2005 Management Studio and in deployment on my C#.NET application I have added SQL Server Express Edition with the application ..

I was using connection string

server=My-PC\\SA;database=My_database;uid=sa;pwd=sql;"

Now on deployment it gives error of instance. So how to make a connection string defaultly that works for both SQL Server 2005 Management Studio and SQL Server Express Edition?

JimmyPena
  • 8,694
  • 6
  • 43
  • 64
Sunny
  • 618
  • 1
  • 7
  • 22

1 Answers1

2

Hopefully this should work,

Server = .\SQLEXPRESS; Integrated Security=SSPI
Anuraj
  • 18,859
  • 7
  • 53
  • 79