请问这是什么问题?

一只老菜鸟 2005-09-12 08:59:53
Microsoft OLE DB Provider for SQL Server 错误 '80040e57'

varchar 值 '263' 的转换溢出了 INT1 列。请使用较大的整数列。

e:\WWWROOT\article\INC\../../inc/main.asp,行 84

把一个article程序从ACCESS转成MSSQL以后,当文章数据超过259条以后就开始出现这个问题了.发文章可以发,也能插入到库里,在数据查询中也可以查询到,可是返回结果得时候就有了上面得错误提示了.请高手帮忙.


main文件中出问题得在:

Public Sub DoOnline(big_class_id, small_class_id, article_id, articles_id, place)
Dim strSql, rs
strSql="SELECT id FROM online WHERE online_id='"&online_id&"'"
NL.DoQuery(1)
Set rs=conn.Execute(strSql)
If rs.Bof And rs.Eof Then
strSql = "INSERT INTO online (online_id, uid, ip, visit_url, from_url, big_class_id"&_
", small_class_id, article_id, articles_id, place, is_hide) VALUES ('"&online_id&_
"', '"&NLuser.uid&_
"', '"&NL.UserInfo(2)&_
"', '"&NL.UserInfo(0)&_
"', '"&NL.UserInfo(1)&_
"', '"&big_class_id&_
"', '"&small_class_id&_
"', '"&article_id&_
"', '"&articles_id&_
"', '"&place&_
"', "&NL.IIF(Request.Cookies(appName&"user")("is_hide")=1, 1, 0)&")"
Else
strSql = "UPDATE online SET uid='"&NLuser.uid&_
"', ip='"&NL.UserInfo(2)&_
"', visit_url='"&NL.UserInfo(0)&_
"', from_url='"&NL.UserInfo(1)&_
"', active_time='"&Now()&_
"', big_class_id='"&big_class_id&_
"', small_class_id='"&small_class_id&_
"', article_id='"&article_id&_
"', articles_id='"&articles_id&_
"', place='"&place&"' WHERE online_id='"&online_id&"'"
End If
conn.Execute(strSql)
If isSql=1 Then
strSql="DELETE FROM online WHERE DateDiff(s, active_time, '"&Now()&"')>"&SiteSet(10, 0)*60
Else
strSql="DELETE FROM online WHERE DateDiff('s', active_time, '"&Now()&"')>"&SiteSet(10, 0)*60
End If
conn.Execute(strSql)
End Sub

这段得" conn.Execute(strSql)"这里就是提示出错得84行.
...全文
124 3 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
一只老菜鸟 2005-09-13
  • 打赏
  • 举报
回复
感谢楼上的提醒。
本来我以为是其中一个表的问题,没想到居然是另外一个表的数据库类型和写入的值不匹配造成的。
ReViSion 2005-09-12
  • 打赏
  • 举报
回复
检查数据库类型与写入的值是不是匹配
一只老菜鸟 2005-09-12
  • 打赏
  • 举报
回复
在线急等.

27,582

社区成员

发帖
与我相关
我的任务
社区描述
MS-SQL Server 应用实例
社区管理员
  • 应用实例社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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