连接到网络上的SQL Server的问题? [英] Problem connecting to sql server on network?

查看:65
本文介绍了连接到网络上的SQL Server的问题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,每个人


我正在尝试使用Windows应用程序连接到c#中的SQL 2000服务器。我要做的是要求用户键入服务器名称,并从用户的输入中获取他们输入的服务器名称并连接到该服务器。我还希望他们输入用户名和密码(SQL身份验证)并隐藏他们的连接字符串。这是我的代码:

Hi, Everyone

I am trying to connect to an SQL 2000 server in c# using a windows application. What I''m trying to do is ask the user to type in the server name and from the user''s input take that server name that they enter in and connect to that server. i also want them to enter a user name and password (SQL authentication) and hide their connection string. Here is my code:

展开 | 选择 | Wrap | 行号

推荐答案

我看到你输入服务器名称通过texbox,但我没有看到任何UserID或PWD传递给连接字符串
I see that you enter the Server name via the texbox but I do not see any UserID or PWD being passed to the connection string
展开 | 选择 | Wrap | 行号



我看到您通过texbox输入服务器名称,但我没有看到任何UserID或PWD传递给连接字符串
I see that you enter the Server name via the texbox but I do not see any UserID or PWD being passed to the connection string
展开 | 选择 | Wrap | 行号


put textBox1.Text =" Connected" ;;在连接字符串之前
put textBox1.Text = "Connected"; before connection string


这篇关于连接到网络上的SQL Server的问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆