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
相关问答:
C# code:
SqlConnection conn = CsDB.sqlcon();
SqlDataAdapter da = new SqlDataAdapter("select fwCoding from bjmuma_fwCoding where OrderNumber='" + Order + & ......
asp.net批量上传图片最好有源码,在线等!!!!!!!
源码很长的。
参考
C# code:
HttpFileCollection files = HttpContext.Current.Request.Files;
if (files.Count <= 1)
{
......
Microsoft JET Database Engine '80040e07'
标准表达式中数据类型不匹配。
\wwwroot\update.asp, line 20
--------------------------------------------------------------------------------
Ho ......
我想将字符串生成一张图片,如何写?
字符串生成图片?
引用
字符串生成图片?
说简单点就是生成验证码的方法。
Private Sub Paint(ByVal strCode As String)
Dim strImgPath As String ......
我用的是Godaddy的服务,使用
C# code:
HttpRuntime.UnloadAppDomain();
来重启程序会抛出异常,应该是权限不够,请教大家还有没有其他的办法?
using System.ServiceProcess;
public void ResetAsp ......