首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > Web开发 >

高人进来指导一下解决方案

2012-03-02 
高人进来指导一下%dim yonghuming1,mima,time1yonghuming1request.Form(yonghuming1)mimarequest.For

高人进来指导一下
<%

  dim yonghuming1,mima,time1
  yonghuming1=request.Form("yonghuming1")
  mima=request.Form("mima1")

set rec=server.createobject("adodb.recordset") 
rec.open "select yonghuming1 from guanliyuan1 where yonghuming1='"&yonghuming1&"'",conn,1,3 

if NOT rec.eof then
response.Write("此用户已是管理员,不需再次添加")
else
 insert="insert into guanliyuan1(yonghuming1,mima1) values('"&yonghuming1&"','"&mima&"')" 
  conn.execute(insert) 


  response.write("增加成功")


end if
%>
提示{rec.open "select yonghuming1 from guanliyuan1 where yonghuming1='"&yonghuming1&"'",conn,1,3 
}参数类型不正确,或不在可以接受的范围之内,或与其他参数冲突。
数据库中字段是varchar型的,也没有打错字,求高手修改一下,加代码,实现判断数据库中有提取的数据时提示不能添加,无数据时添加到数据库

[解决办法]
dim yonghuming1,mima,time1
yonghuming1=request.Form("yonghuming1")
mima=request.Form("mima1")
response.write "select yonghuming1 from guanliyuan1 where yonghuming1='"&yonghuming1&"'"
response.end()
打印出来看看 直接在sqlserver中运行看看

热点排行