connection strings in development/deployment

  • Thread starter Thread starter Uri Dor
  • Start date Start date
U

Uri Dor

Hi, everyone,

I just want to be sure that the solution I've found makes sense to you
all and that I'm not ignoring some simpler solution.

Problem 1 is that as developers we want one connection string (to
connect to our development SQL Server or to MSDE) and when the app is
deployed we want another.
The solution for this is the app.config file.

Problem 2 is that as we are several developers in the same team, we each
want to connect to a different database. And we want to use that
database when working with the designer (adding SqlConnections, etc.),
in which case the app.config file is ignored.
The solution for this is using MSDE, giving a constant name to the
database and specifying "127.0.0.1" as the data source.

Does this make sense? Any other ideas?
It seems to work, anyway.

Thx,
Uri
 
Hi Uri,

First of all, I would like to confirm my understanding of your issue. From
your description, I understand that you need to get some better advices
than you're doing now for sqlconnection. If there is any misunderstanding,
please feel free to let me know.

For problem1, I think it's okay to put the app.config file. However, if
you're using the SQL authentication that password is stored in the
connection string, it's better to encrypt it and store it in the registry.
The following article talks about this.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/secmod/html
/secmod25.asp

For problem2, I think you've got the best solution to use MSDE.

HTH.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 
Back
Top