SQL语句的菜鸟问题!在线等答案!解决就结帖!
语句如下:
SELECT * FROM TestDataTable ORDER BY ABS(TSR-[Sr])
TSr为我定义的变量。我定义了一个编辑框,想在运行的时候通过输入TSr再UpdateData()来实时的更改TSr的值。运行的时候会出现这个错误对话框:
Runtime Error!
Program:D:\DBProg\Debug\DBProg.exe
This application has requested the Runtime to
terminate it in an unusual way.Please contact the
applicatuion's support team for more nformation
但是如果把TSr换成"SELECT * FROM TestDataTable WHERE Sr=0.45"就可以。我想可能是变量的问题,我把语句还成了"SELECT * FROM TestDataTable WHERE Sr=TSr"也不行,跟SELECT * FROM TestDataTable ORDER BY ABS(TSR-[Sr])一样,所以是不是SQL语句的格式写错了?