主题:asp连接sql server 2000问题
我编写的代码程序是:
dim conn
set conn=server.createobject("adodb.connection")
conn.open "dsn=my122;uid=sa;pwd=123456"
%>
<%
dim strsql,rs
strsql="select * from yh"
set rs=db.execute(strsql)
response.write rs("姓名")
%>
<%
db.close
set db=nothing
但运行后出现以下错误:Microsoft VBScript 编译器错误 错误 '800a03f6'
缺少 'End'
/iisHelp/common/500-100.asp,行242
Microsoft OLE DB Provider for ODBC Drivers 错误 '80004005'
[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
/load.asp,行15
请帮忙查找原因
dim conn
set conn=server.createobject("adodb.connection")
conn.open "dsn=my122;uid=sa;pwd=123456"
%>
<%
dim strsql,rs
strsql="select * from yh"
set rs=db.execute(strsql)
response.write rs("姓名")
%>
<%
db.close
set db=nothing
但运行后出现以下错误:Microsoft VBScript 编译器错误 错误 '800a03f6'
缺少 'End'
/iisHelp/common/500-100.asp,行242
Microsoft OLE DB Provider for ODBC Drivers 错误 '80004005'
[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
/load.asp,行15
请帮忙查找原因