首页
社区
课程
招聘
[旧帖] [求助]执行delete语句失败原因??? 0.00雪花
发表于: 2011-6-2 22:23 5016

[旧帖] [求助]执行delete语句失败原因??? 0.00雪花

2011-6-2 22:23
5016
invoke lstrlen,offset sqldelete
invoke SQLExecDirect,@hstmt,offset sqldelete,eax
失败了,用诊断函数,返回一个数是07002
本来这些语句是执行select,insert等语句的,都没问题,一旦把指针指向delete语句就不行了。
这个函数本来不用自己调用什么绑定函数的吧,可是查看msdn里的07002错误,发现:
COUNT field incorrect:
The number of parameters specified in SQLBindParameter was less than the number of parameters in the SQL statement contained in *StatementText.
SQLBindParameter was called with ParameterValuePtr set to a null pointer, StrLen_or_IndPtr not set to SQL_NULL_DATA or SQL_DATA_AT_EXEC, and InputOutputType not set to SQL_PARAM_OUTPUT, so that the number of parameters specified in SQLBindParameter was greater than the number of parameters in the SQL statement contained in *StatementText.
怎么回事???

[课程]Android-CTF解题方法汇总!

收藏
免费 0
支持
分享
最新回复 (9)
雪    币: 33
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
2
啊?????????????
2011-6-3 18:46
0
雪    币: 8
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
3
不太清楚,帮顶
2011-6-3 18:50
0
雪    币: 100
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
4
英语不及格的菜鸟飘过,只能看个大概意思,希望对楼主有少许帮助:

楼主的程序貌似少了1-N个参数.

再仔细检查下?
2011-6-3 19:43
0
雪    币: 33
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
5
可是把offset sqldelete改成offset sqlselect就可以了,一改回sqldelete就出现那个讨厌的07002
2011-6-3 19:50
0
雪    币: 33
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
6
解决错误有没有方法的啊???
从哲学的角度来回答也可以的啊?
传授我一种寻找“错误”的思想方法啊!!!!!!!!!!!!!
2011-6-3 19:54
0
雪    币: 33
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
7
我调用的函数是SQLExecDirect,跟SQLBindParameter什么鬼事啊???
而SQLExecute这个函数使用前才要用到SQLBindParameter啊??
2011-6-3 19:58
0
雪    币: 33
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
8
问题已经解决
错在哪里呢?保密。如果是你用这函数,你也许%99的可能不会遇到这样的问题。所以无需关心,哈哈。
2011-6-3 20:44
0
雪    币: 79
活跃值: (40)
能力值: ( LV5,RANK:60 )
在线值:
发帖
回帖
粉丝
9
额 是不是 参数的问题呢
2011-6-3 22:14
0
雪    币: 2
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
10
这个是数据库的执行命令吗?不懂得的哦!
2011-6-4 00:11
0
游客
登录 | 注册 方可回帖
返回
//