SQL服务器名称 [英] SQL SERVER NAME

查看:82
本文介绍了SQL服务器名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的所有人,
我正在将VB.net 2008与VB包随附的SQL Server一起使用.
现在我想建立一个新的连接.
我正在执行以下步骤:-
1.创建新连接
2. OLE DB(ADO)
3.用于SQL Server的Microsoft OLE DB提供程序
4.接下来,询问服务器名称,用户ID,密码

请指导我如何获取服务器名称,用户ID和用户名的信息.下一个工作密码

Dear All,
I''m using VB.net 2008 with SQL Server which come with VB pack.
Now I want to establish a new connection.
I doing following steps:-
1.Create New connection
2. OLE DB(ADO)
3. Microsoft OLE DB Provider for SQL Server
4. Next, ask for Server Name, User Id,Password

Kindly guide How i get this infromation of Servername, User Id & Password for working next

推荐答案

我认为默认值为;

本地主机\ sqlexpress

如果使用Windows身份验证,则管理员帐户应具有对SQL Server的默认访问权限.
I think the default is;

localhost\sqlexpress

the administrator account should have default access to the SQL server if using windows authentication.


如果要连接到本地sql服务器,则可以使用计算机名或句号". (不带引号)
If you are connecting to your local sql server, you can either use your machine name or period "." (with out the quotes)


你好..
不必连接到SQL Server数据库,插入用户ID和密码..可以使用Windows身份验证

hello..
Is not necessary to connect to SQL Server databases inserting user id and password .. can be used windows authentication

Dim connStr As String = "provider=sqloledb;data source=.\sqlexpress;database=dbname;integrated security=sspi"
Dim conn As New System.Data.OleDb.OleDbConnection(connStr)
conn.Open()



通过在sql server中创建用户来获取用户ID和密码的情况




if you have a user id and password by creating a user in sql server


Dim connStr As String = "provider=sqloledb;data source=.\sqlexpress;database=dbname;user id=user;password=pass"


这篇关于SQL服务器名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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