| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 576 人关注过本帖
标题:标准表达式中数据类型不匹配
只看楼主 加入收藏
double629
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2006-3-22
收藏
 问题点数:0 回复次数:0 
标准表达式中数据类型不匹配
我有一套烂摊子程序,发现其中的数据库和程序对不上号,好像数据库是别的网站的似的,我现在想给这套程序重新建立数据库,但是按照程序所写建立数据库总是出现错误提示“标准表达式中数据类型不匹配”,我asp也是初学,很多问题不明表自己解决不了,特此求告手指点。 下面是数据提交页的程序: <%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%> <% dim title(5) title(1)="添加新闻" title(2)="添加公告" title(3)="添加产品" title(4)="添加案例" title(5)="添加客户" tid=Request("tid") if tid="news" then subject=title(1) elseif tid="gg" then subject=title(2) elseif tid="product" then subject=title(3) elseif tid="project" then subject=title(4) else subject=title(5) end if %> 无标题文档
 
<%=subject%>
标题:  
图片:  
内容:   ">
   
下面是数据接收页的程序: <%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%> <% on Error resume next response.buffer=true set upload=new upload_5xSoft title=upload.form("title") content=upload.form("content") pro_name=upload.form("pro_name") temp=upload.form("temp") set image=upload.file("img") imgname1=image.filename if image.filename<>"" then imgname=getfilename(image.filename) image.SaveAs Server.MapPath("img/"&imgname) end if if imgname1<>"" then SQL="insert into product(pro_name,title,content,img,pub_date)Values('"&pro_name&"','"&title&"','"&content&"','"&img&"','"&pub_date&"')" else SQL="insert into product(pro_name,title,content,pub_date)Values('"&pro_name&"','"&title&"','"&content&"','"&pub_date&"')" end if con.Execute SQL function getfilename(imgname) getfilename=replace(replace(replace(cstr(now)," ",""),"-",""),":","")&radm()&right(imgname,4) end function if err.number<>0 then Response.Write(err.Description) else Response.Write("
信息已经添加成功!关闭窗口
") end if %>
程序代码:
<script language=\"JScript\" runat=\"server\">
function radm() { return Math.round(Math.random()*100) }
</script>
无标题文档 数据库链接是在Open.asp中 网高手能给我这小菜鸟指点迷津 多谢多谢

[此贴子已经被作者于2006-3-22 22:21:05编辑过]

搜索更多相关主题的帖子: 类型 数据 表达 
2006-03-22 22:20
快速回复:标准表达式中数据类型不匹配
数据加载中...
 
   



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

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