郁闷啊、、我刚入手。asp无法连接到数据库
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.
<html xmlns="http://www.
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>
<body>
<%
if request ("method")="value" then
set conn=server.createobject("adodb.connection")
conn.open"provider=microsoft.jet.oledb.4.0; data source=" & server.MapPath("link.mdb")
conn.execute "insert into link_aa (link_name,link_address,link_info) values('"&request("link_name")&"','"&request("link_address")&"','"&request("link_info")&"')"
%>
<SCRIPT LANGUAGE="JavaScript">
alert("成功")
</script>
<%
end if
%>
<table width="200" border="0" align="center">
<tr>
<th scope="row"><div align="right">网站名称</div></th>
<td><form id="form2" name="form2" method="post" action="">
<label>
<input type="text" name="textfield" id="link_name" />
</label>
</form> </td>
</tr>
<tr>
<th scope="row"><div align="right">网站地址</div></th>
<td><form id="form3" name="form3" method="post" action="index.asp">
<label>
<input name="link_address" type="text" id="link_address" />
</label>
</form> </td>
</tr>
<tr>
<th scope="row"><div align="right">网站描述</div></th>
<td><form id="form4" name="form4" method="post" action="index.asp">
<label>
<input name="link_info" type="text" id="link_info" />
<input name="method" type="hidden" value="save" />
</label>
</form> </td>
</tr>
<tr>
<th colspan="2" scope="row"><form id="form1" name="form1" method="post" action="index.asp">
<label>
<input type="submit" name="Submit" value="提交" />
</label>
</form> </th>
</tr>
</table>
<%
if request ("method")="value" then
conn.close
set conn=nothing
end if
%>
</body>
</html>