一、问题描述:
ins:=STRTRIMRIGHT(STKLABEL,'12');
DATABASE('Provider=Microsoft.ACE.OLEDB.12.0;Data Source=D:\LuyaDB.mdb');
DBTABLE('Select * From Web_99qh where InstrumentID="'&ins&'" order by DT');
——出现问题:字符串的语法错误,在查询表达式‘InstrumentID=“中。
二、问题:
DBTABLE('Select * From Web_99qh where InstrumentID="au" order by DT');
这样写是没有错误的,但是为什么上面的写法会出现错误?
经过调试,发现'Select * From Web_99qh where InstrumentID="'&ins&'" order by DT'实际上就是:'Select * From Web_99qh where InstrumentID="au" order by DT'。
不懂,求大神解答~
TABASE(
DBTABLE(
这2个函数目前不能使用变量的,只能是一个完整的固定的字符串