with ADOQuery3 do
begin
SQL.Clear;
SQL.Add('insert into accountcount(itembm,kjnf) select itembm,''+g_kjyf+'' from iteminfo where itembm not in (select itembm from accountcount where kjnf=''+g_kjnf+'')');
execsql;
close;
end;将varchar值'+g_kjnf+'转换为数据类型为smallint的列时发生语法错误
上面的搞错了,是这个数据查询,g_kjyf是变量,word类型
begin
SQL.Clear;
SQL.Add('insert into accountcount(itembm,kjnf) select itembm,''+g_kjyf+'' from iteminfo where itembm not in (select itembm from accountcount where kjnf=''+g_kjnf+'')');
execsql;
close;
end;将varchar值'+g_kjnf+'转换为数据类型为smallint的列时发生语法错误
上面的搞错了,是这个数据查询,g_kjyf是变量,word类型
解决方案 »
- Access数据库里面,字段类型为文本的,默认值是什么啊?
- 急!我想问一个关于TdxDBTreeList的问题!个位大虾快快进来回答我的问题哦!
- ★高分请教,分不够我再加,“研究一个年假没有搞定”???
- 有良知的中国人进来,放200分,看看这个网站www.chinapig.com,谁能帮忙做掉?!放分!!!!!!!!
- ★★★★★撒分了★★★★★
- 如何给treeview加上checkbox或者使用替代treeview的控件 在线等
- 请问哪位大哥有OUTLOOK的通信簿读取和写入的例子呢??
- 字符串、数组
- 想得分的进来
- 当用窗体上的adostoreproc控件,就能得到他的参数。如果用动态生成的就无法找到他的参数,请问为什么/
- FastReport用LoadFromStream加载报表,却显示不出来
- 请教个Delphi版本的问题
begin
SQL.Clear;
SQL.Add('insert into accountcount(itembm,kjnf) select itembm,''+g_kjyf+'' from iteminfo where itembm not in (select itembm from accountcount where kjnf=''+g_kjnf+'')');
execsql;
close;
end;
将varchar值'+g_kjnf+'转换为数据类型smallint的列时发生语法错误
'insert into accountcount(itembm,kjnf) select itembm,'
+ IntToStr(g_kjyf)
+ ' from iteminfo where itembm not in (select itembm from accountcount where kjnf='
+ IntToStr(g_kjnf)
+ ')'
);