SQl服务器在Windows Forms应用程序中登录.

SQl服务器在Windows Forms应用程序中登录.

问题描述:

你好!

配置如下
远程SQLserver 2005后端
Windows窗体前端(Visual Studio 2008)

是否可以通过登录表单为数据连接提供用户名和密码,而不是将其存储在连接字符串中?


我需要每个用户每次启动应用程序时都能够使用自己的(sqlserver)登录名.

就像我的访问前端发生的一样.

任何信息将不胜感激!

谢谢!

hello!

The configuration is as follows
Remote SQLserver 2005 back-end
Windows Forms Front end (Visual studio 2008)

Is there a way to provide the username and password for a data connection from a Login form and not stored in a Connection string?


I need each user to be able to use his own (sqlserver) login everytime the application is started.

just like it happened with my access front end.

any information will be greatly appreciated!!

thank You!

肯定有一种方法!

您可以构建自己的自定义模式对话框 [连接字符串 [ ^ ].
There is definitely a way to do this!

You can build your own custom modal dialog[^] to ask the user for a user name and password and then build the connection string[^] for the database using what they enter.