标题:asp+sql问题
取消只看楼主
boy8088
Rank: 1
等 级:新手上路
帖 子:9
专家分:0
注 册:2006-3-24
 问题点数:0 回复次数:7 
asp+sql问题
在SQL数据库表中有一个字段是文本类型,其它是整型和字符,运行ASP时其它字段都正常就文本类型的这个字段没有显示,也没有错误提示。请教各位高手,本人是初学者。
搜索更多相关主题的帖子: sql asp 
2006-03-24 15:11
boy8088
Rank: 1
等 级:新手上路
帖 子:9
专家分:0
注 册:2006-3-24
得分:0 

非常感谢携手共进

2006-03-24 15:24
boy8088
Rank: 1
等 级:新手上路
帖 子:9
专家分:0
注 册:2006-3-24
得分:0 
<!--#include file="../Connections/wahdbconn.asp" -->
<%
con_id=trim(request.QueryString("con_id"))
set conn=server.CreateObject("adodb.connection")
conn.open MM_wahdbconn_STRING
sql_qz="select * from hr_content where con_id="&con_id
set qz_rs=conn.execute(sql_qz)
%>
<%=qz_rs("con_title")%
.
.
.
<%=qz=rs<"con_content">%>
<%
qz_rs.close
set qz_rs=nothing
conn.close
set conn=nothing
%>
2006-03-24 16:23
boy8088
Rank: 1
等 级:新手上路
帖 子:9
专家分:0
注 册:2006-3-24
得分:0 
这和我的不是一样的吗
2006-03-24 16:53
boy8088
Rank: 1
等 级:新手上路
帖 子:9
专家分:0
注 册:2006-3-24
得分:0 
这是我打错的改了也不行,兄弟
2006-03-24 17:47
boy8088
Rank: 1
等 级:新手上路
帖 子:9
专家分:0
注 册:2006-3-24
得分:0 
26683327

我把文本的转换成字符型就出来了
2006-03-27 16:50
boy8088
Rank: 1
等 级:新手上路
帖 子:9
专家分:0
注 册:2006-3-24
得分:0 
兄弟们帮帮我
<%@language="vbscript" codepage="936"%>
<!--#include file="connnews/connnews.asp"-->
<%
admin_name=trim(request.form("admin_name"))
admin_password=trim(request.Form("admin_password"))
admin_yz=trim(request.Form("admin_yz"))
if admin_name="" and admin_password="" and admin_yz="" then
response.Write("<script language=javascript>alert('请填写完整!');")
response.Write("window.history.back();")
response.Write("</script>")
elseif Isnumeric(admin_yz)=true and int(session("getcode"))=int(admin_yz) then
set conn=server.CreateObject("adodb.connection")
conn.open news_data_string
set rs = server.CreateObject("adodb.recordset")
rs.activeconnection = news_data_string
rs.source="select admin_name from news_admin where admin_name='"&admin_name &"'"
rs.cursortype=0
rs.cursorlocation=2
rs.locktype=1
rs.open()
if not rs.bof and not rs.eof then
if rs("admin_password")=admin_password then
session("admin_name")=rs("admin_name")
response.Redirect("admin_index.asp")
else
response.Redirect("admin_login.asp?msg="&server.URLEncode("密码不正确!"))
end if
else
response.Redirect("admin_login.asp?msg="&server.URLEncode("非法用户!"))
end if
else
response.Redirect("admin_login.asp?msg="&server.URLEncode("验证码错误!"))
rs.close
set rs=nothing
end if
%>
错误提示:(0x800A000D)
2006-03-29 16:34
boy8088
Rank: 1
等 级:新手上路
帖 子:9
专家分:0
注 册:2006-3-24
得分:0 
<%
admin_name=trim(request.form("admin_name"))
admin_password=trim(request.Form("admin_password"))
admin_yz=trim(request.Form("admin_yz"))
if admin_name="" and admin_password="" and admin_yz="" then
response.Write("<script language=javascript>alert('请填写完整!');")
response.Write("window.history.back();")
response.Write("</script>")
elseif Isnumeric(admin_yz)=true and int(session("getcode"))=int(admin_yz) then
set conn=server.CreateObject("adodb.connection")
conn.open news_data_string
set rs = server.CreateObject("adodb.recordset")
rs.activeconnection = news_data_string
rs.source="select admin_name from news_admin where admin_name='"&admin_name &"'"
rs.cursortype=0
rs.cursorlocation=2
rs.locktype=1
rs.open()
if not rs.bof and not rs.eof then
if rs("admin_password")=admin_password then
session("admin_name")=rs("admin_name")
response.Redirect("admin_index.asp")
else
response.Redirect("admin_login.asp?msg="&server.URLEncode("密码不正确!"))
end if
else
response.Redirect("admin_login.asp?msg="&server.URLEncode("非法用户!"))
end if
else
response.Redirect("admin_login.asp?msg="&server.URLEncode("验证码错误!"))
rs.close
set rs=nothing
end if
%>
2006-03-29 16:38



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-52507-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.107289 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved