简体   繁体   中英

Make a setting to connect to server in SQL Server 2008 R2 using C#

How can I make a setting so that I can connect to the server in SQL Server 2008 R2? I mean when my program runs I need to insert first the data source, initial catalog etc. so that I can connect to the server.

This answer might point you in the right direction if you're using Entity Framework to access your database:

Setup Entity Framework For Dynamic Connection String

创建一个表单,该表单通过TextBoxes等询问这些值。将它们存储在配置文件/数据库表中,您就在那里。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM