不通过DSN访问SQL SERVER
类别: 数据库教程
在连接字符串里加上服务器和数据库驱动程序就可以了
Example:
dim conn
set conn = Server.CreateObject("ADODB.Connection")
conn.ConnectionString = "driver={SQL Server};"server=yourserver;uid=sa;pwd=pwd;database=pubs"
conn.open
Set cmd= Server.CreateObject("ADODB.Command")
Set cmd.ActiveConnection = conn
Example:
dim conn
set conn = Server.CreateObject("ADODB.Connection")
conn.ConnectionString = "driver={SQL Server};"server=yourserver;uid=sa;pwd=pwd;database=pubs"
conn.open
Set cmd= Server.CreateObject("ADODB.Command")
Set cmd.ActiveConnection = conn
- 上一篇: 简化SQL语句一例
- 下一篇: 怎样用SQL 2000 生成XML
-= 资 源 教 程 =-
文 章 搜 索