T
treadwind
Unregistered / Unconfirmed
GUEST, unregistred user!
Number:=FlatListBox2.ItemText;
DBISAMQuery1.close;
DBISAMQuery1.SQL.Text:='Select * From sdb where ID='''+Number+'''';//这里出错
DBISAMQuery1.Open;
数据查询部分,直接加入变量会出现一下错误:
DBISAM Engine Error # 11949 SQL parsing error - Expected NULL, Boolean, SmallInt, Word, AutoInc, Integer, LargeInt, Currency, Float, or BCD expression but instead found '1' in SELECT SQL statement at line 1, column 28.
帮忙看看是什么问题?
注:不使用变量,直接使用ID如:
DBISAMQuery1.SQL.Text:='Select * From sdb where ID=1';//这样就没有问题。
DBISAMQuery1.close;
DBISAMQuery1.SQL.Text:='Select * From sdb where ID='''+Number+'''';//这里出错
DBISAMQuery1.Open;
数据查询部分,直接加入变量会出现一下错误:
DBISAM Engine Error # 11949 SQL parsing error - Expected NULL, Boolean, SmallInt, Word, AutoInc, Integer, LargeInt, Currency, Float, or BCD expression but instead found '1' in SELECT SQL statement at line 1, column 28.
帮忙看看是什么问题?
注:不使用变量,直接使用ID如:
DBISAMQuery1.SQL.Text:='Select * From sdb where ID=1';//这样就没有问题。