asp获取access数据库值的简单问题---------
<html>
<head>
<title>访问数据库</title>
</head>
<body>
<table width="600" border="1" cellpadding="0" cellspacing="0" bgcolor="#0099FF">
<tr>
<td>id</td>
<td>部门</td>
<td>职位</td>
<td>姓名</td>
<td>电话</td>
</tr>
<%
dim conn, connstr ,rs,datafile,sql
datafile ="zh.mdb"
set conn = Server.CreateObject("ADODB.Connection")
connstr ="Provider =Microsoft.Jet.OLEDB.4.0;Data Source="&Server.MapPath(datafile)
conn.open connstr
set rs = server.CreateObject("adodb.recordset")
sql="select * from zhzxmr"
rs.open sql ,conn,1,1
do while not rs.bof and rs.eof
%>
<tr>
<td><%rs("id")%></td>
<td><%rs("department")%></td>
<td><%rs("level")%></td>
<td><%rs("s_name")%></td>
<td><%rs("phone")%></td>
</tr>
<%
rs.movenext
loop
rs.close
set rs = nothing
相关问答:
Imports System.ComponentModel
Imports System.Web.UI
Imports System.Web.UI.Design
Imports System.Web.UI.WebControls
Namespace CBDAspNet.WebControls.HTML
''' <summary>
'' ......
本人不会asp,报错了,请大家帮忙看看。
代码如下:
<%
dim keyword_Name,keyword_YJ,keyword_RQ
if rs("QS_PASS_1_name")<>"0,0" then
keyword_Name=split(rs("QS_ ......
万网的服务器支持伪静态的,直接用rewrite在web.config文件写规则,也不用安装组件就可以实现伪静态,但是在时代互联服务器就用不了了,咨询它的客服,他说他们服务器(基本型C)不支持伪静态的.请问一下各位我该用什么方法 ......
Dim aa
aa=GetURL("http://localhost/test1.asp")
Function GetURL(url)
Set Retrieval = Server.CreateObject("Microsoft.XMLHTTP")
With Retrieval
On E ......