database('provider=microsoft.jet.oledb.4.0;data source=d:\阻力支撑.mdb');
if barpos=1 then begin
dbexecute('drop table PTA_bigzl');
dbexecute('create table PTA_bigzl(阻力日 datetime,阻力价 number,前浪日数 number)');
end
阻力日:=ref(date,2);
阻力价:=ref(h,2);
前浪日数:=barslast(h>阻力价)-1;
if 阻力价=hhv(h,5) then begin
dbexecute('insert into PTA_bigzl(阻力日,阻力价,前浪日数) values("阻力日","阻力价","前浪日数")');
end
if ISLASTBAR then exit;
设置在K线图上,换一个品种,数据库就增大月100k,但是用office打开数据表却始终没有任何数据。
请教,如何才能写入数据?3Q
dbexecute('insert into PTA_bigzl(阻力日,阻力价,前浪日数) values("阻力日","阻力价","前浪日数")');
还请仔细看看你的这些SQL语句,明明是创建的日期跟数据类型的字段,你确往里插字符串数据