存储过程碰到怪问题,请大家帮我看看

chenshu218 2006-06-19 09:40:14
<%
'存储过程执行脚本
Set Mycommand.ActiveConnection = Myconn
Mycommand.CommandType = adCMdStoredProc
Mycommand.CommandText = "KaoHe_d"

Set MyParam1 = Mycommand.CreateParameter("Kname",adVarChar,adparaminput,50)
Mycommand.Parameters.Append MyParam1
Set MyParam2 = Mycommand.CreateParameter("starttime",adDate,adparaminput,30)
Mycommand.Parameters.Append MyParam2
Set MyParam3 = Mycommand.CreateParameter("endtime",adDate,adparaminput,30)
Mycommand.Parameters.Append MyParam3
Set MyParam4 = Mycommand.CreateParameter("State",adInteger,adparamOutput,30)
Mycommand.Parameters.Append MyParam4

Mycommand("Kname") = request("kname")
Mycommand("starttime") = request("start")
Mycommand("endtime") = request("end")
Mycommand.Execute

if Mycommand("State")=1 then
response.write"<script>alert('统计表生成成功!');window.location.href='kaohemanage.asp';</Script>"
response.end
else
response.write"<script>alert('统计表生成失败!检查统计名称是否有重复');history.back();</Script>"
response.end
end if
%>

调试后确认request("kname")的值没有问题
如果request("kname")的值为汉字,小写字符入库Kname字段都为空值
更奇怪的是,如果request("kname")为大写字符,它只入库第一个字符,其他几个字段入库都没有问题

如"adsadada","撒大撒大似的按时",入库字段"NULL"
"SDFASDSADA",入库字段"S"

请大家帮我解决
...全文
69 回复 打赏 收藏 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

28,402

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧