Home > Database > Mysql Tutorial > asp连接SQL数据库的代码

asp连接SQL数据库的代码

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-07 17:42:42
Original
1247 people have browsed it

connstr="driver={SQL Server};server=(local);uid=sa;pwd=sa;database=Your database" 语法介绍: 1、driver={SQL Server};始终为这个形式,不变 2、server:可以是local、你计算机的IP、计算机的名称中的任意一个 3、uid:登陆SQL的用户名 4、pwd:登陆SQL

connstr="driver={SQL Server};server=(local);uid=sa;pwd=sa;database=Your database"
语法介绍:
1、driver={SQL Server};始终为这个形式,香港虚拟主机,不变
2、server:可以是local、你计算机的IP、计算机的名称中的任意一个
3、uid:登陆SQL的用户名
4、pwd:登陆SQL的密码
5、database:要连接的数据库名称。
然后再声明连接对象:
set conn=Server.Createobject("adodb.connection")
然后用Open方法打开连接
conn.open connstr

引用:

,香港空间,虚拟主机
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template