短文两篇六《对话》:asp连接mysql的问题

来源:百度文库 编辑:高考问答 时间:2024/04/28 03:29:14
反复弄了好多次,也用了正确的代码为什么我调试的时候IE还是提示这样的错误呢,真实让我太痛苦了,哪位能帮小弟解答一下啊
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC SQL Server Driver][SQL Server]无法打开登录 'ASPTest' 中请求的数据库。登录失败。
/Asptest/修改删除例子2.asp, 第 11 行

我的连接程序是
<html>
<head>
<title>修改及删除记录综合实例</title>
</head>
<body>
<%
Dim cn,rs
Dim mySql
Set cn = Server.CreateObject("ADODB.Connection")
Set rs = Server.CreateObject("ADODB.RecordSet")
cn.Open "Driver={SQL Server};Server=MICROSOF-962462;Database=ASPTest;" & _
"UID=sa;PWD=admin"
rs.Open "SELECT * FROM TABLE1",cn
%>
<p align="center">已注册ID列表</p>
<table border="1" cellpadding="0" cellspacing="0" bordercolor="#111111" width="391"

align=center>
<tr>
<td width="97">注册ID</td>
<td width="97">注册密码</td>
<td width="77">Email地址</td>
<td width="60">操作1</td>
<td width="56">操作2</td>
</tr>
<%
Do While Not rs.Eof
%>
<tr>
<td width="97"><%=rs(0)%> </td>
<td width="97"><%=rs(1)%> </td>
<td width="77"><%=rs(2)%> </td>
<td width="60"><a href="09_04a.asp?txtID=<% =rs(0) %>">修改</a></td>
<td width="56"><a href="09_04c.asp?txtID=<% =rs(0) %>">删除</a></td>
</tr>
<%
rs.MoveNext
Loop
%>
</table>
<%
rs.Close
cn.Close
Set rs = Nothing
Set cn = Nothing
%>
</body>
</html>
我不太会,sql server?你说数据库啊,我装了啊,还建立了一个表的,在ODBC中我也配置了我的数据源了,但是还是打不开,郁闷坏了

晕```
cn.Open \"Driver={SQL Server};Server=MICROSOF-962462;Database=ASPTest;\" & _
\"UID=sa;PWD=admin\"

--------------
Driver={SQL Server}
sever=microsof962462
应该是错的!你没有装SQL SEVER
你最好上网查一下连MYSOQL的语句

你装SQL SERVER了没啊?