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

内存变量应用异常

2012-02-09 
内存变量应用错误VFP+SQL:m.dengluname005TEXT TO m.HX_SQLCmd10 NOSHOW TEXTMERGEselect CAST(0 AS BI

内存变量应用错误
VFP+SQL:


m.dengluname="005"

TEXT TO m.HX_SQLCmd10 NOSHOW TEXTMERGE 
select CAST(0 AS BIT),A.*,
P.user_name as 制单人姓名 
FROM CheDuiFeiYong A 
LEFT JOIN user_password P ON A.zhidanid=P.user_id 
 where (old_to_new = 1 and rukuid is null and A.zhidanid = m.dengluname) 
ENDTEXT
?SQLEXEC(nhandle,m.HX_SQLCmd10,"CheDuiFeiYongDele_temp")

现象:如果去掉上述红色部分,值=1
如果不去掉上述红色部分,值=-1

why?




[解决办法]
假设为字符型
m.dengluname="005"

TEXT TO m.HX_SQLCmd10 NOSHOW TEXTMERGE
select CAST(0 AS BIT),A.*,
P.user_name as 制单人姓名
FROM CheDuiFeiYong A
LEFT JOIN user_password P ON A.zhidanid=P.user_id
where (old_to_new = 1 and rukuid is null and A.zhidanid ='<<m.dengluname>>')
ENDTEXT
? m.HX_SQLCmd10

热点排行