首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C++ Builder >

这个SQL 语句为什么又错了?解决思路

2012-02-04 
这个SQL 语句为什么又错了??Stringadostr selectcount(projectname)asnumfromerrorpottablewhere25range

这个SQL 语句为什么又错了??
String     adostr= "select   count(projectname)   as   num   from   errorpottable   where   25range> StrToInt(frmSelectProject-> edt25Range-> Text) ";


> >   说是语法错误   郁闷死了

[解决办法]
adostr= "select count(projectname) as num from errorpottable where 25range> "+StrToInt(frmSelectProject-> edt25Range-> Text);
看看
[解决办法]
adostr= "select count(projectname) as num from errorpottable where 25range> "+StrToInt(frmSelectProject-> edt25Range-> Text.c_str());
试试

[解决办法]
请使用关中刀客的:
adostr= "select count(projectname) as num from errorpottable where 25range> "
+frmSelectProject-> edt25Range-> Text;
这个应该就是对的
[解决办法]
字段名可以用数据开头吗?
[解决办法]
回复楼主,这样可以是可以,但系统会把你的字段名字当成数字或者字符,所以建议你字段名不要以数字开头

热点排行