[经验]经验
这是sql数据连接方法,你可以参考写一下
<%
Set conn = Server.CreateObject("ADODB.Connection")
connstr="driver={sql server};server=127.0.0.1;uid=sa;pwd=wykf123;database=data"
conn.open connstr
%>
建议你用调用方法连接数据库文件。,这样清晰<!--#include file="conn.asp"-->
<%
set conn=server.CreateObject("ADODB.connection")
strConnect="driver={sql
server};server=server=(local);uid=sa;pwd=sa;database=internet"
conn.open strConnect
set recordset=conn.execute("SQLSTR")
%>
<%
Set conn = Server.CreateObject("ADODB.Connection")
connstr="driver={sql server};server=127.0.0.1;uid=sa;pwd=wykf123;database=internet"
conn.open connstr
%>