易截截图软件、单文件、免安装、纯绿色、仅160KB

asp新手初连数据库 求前辈帮忙查错!

<html>
<HEAD>
<TITLE>asp11a.asp</TITLE>
</HEAD>
<body bgcolor="#FFFFFF">
<%
call query2table("select * from publishers where name like \'A%%\'")
' 将表 publishers 中所有姓名中有字母 A 的记录查询出来
%>
<!--#include virtual="/asptest/subdbtable.inc"-->
</BODY>
</html>

下面是subdbtable.inc文件
<%
sub query2table(inputquery)
set conntemp=server.createobject("adodb.connection")
conntemp.open "DSN=longan;uid=sa;pwd=zw112358"
set rstemp=conntemp.execute(inputquery) '执行SQL语句并把返回结果保存到rstemp
howmanyfields=rstemp.fields.count -1
' 统计数据库中的列数
%>
<table border=1><tr>
<%
for i=0 to howmanyfields
%>
<td><b><%=rstemp(i).name%></B></TD>
<% next %>
</tr>
<%
do while not rstemp.eof
%>
<tr>
<% for i = 0 to howmanyfields
thisvalue=rstemp(i)
If isnull(thisvalue) then
thisvalue="" ' 如果字段为空,则将变量 thisvalue 的值定义为一个空格
end if%>
<td valign=top><%=thisvalue%></td>
<% next %>
</tr>
<%rstemp.movenext
loop%>
</table>
<%
rstemp.close
set rstemp=nothing
conntemp.close
set conntemp=nothing


相关问答:

asp.net导出EXCEL问题! - .NET技术 / ASP.NET

C# code:

SqlConnection conn = CsDB.sqlcon();
SqlDataAdapter da = new SqlDataAdapter("select fwCoding from bjmuma_fwCoding where OrderNumber='" + Order + & ......

如何用js获得 asp 写入的session - Web 开发 / ASP

如何用js获得 asp 写入的session
session("user_id") = "cqsj1987"
怎么样用js 这个session 值?
JScript code:
var uid="<%=session("user_id")%>"

<%
s ......

ASP.NET相关技术 - .NET技术 / ASP.NET

各位大侠,我学习的是ASP.NET,想知道相关技术有哪些,就像JAVA EE中有struct sping jsp severlet 等,ASP.NET还有哪些些相关技术。
http://topic.csdn.net/u/20090914/21/af27de99-f0f3-4cfd-9379-13764f8ec6b1.ht ......

asp.net如何重启网站? - .NET技术 / ASP.NET

我用的是Godaddy的服务,使用
C# code:
HttpRuntime.UnloadAppDomain();
来重启程序会抛出异常,应该是权限不够,请教大家还有没有其他的办法?
using System.ServiceProcess;
  public void ResetAsp ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号