阅读版:
以下内容为程序代码:
1 runmode:0;
2
3 database('provider=microsoft.jet.oledb.4.0;data source=d:\dbdemo\test.mdb');
4
5 if barpos=1 then begin
6 sql1:='create table '+marketlabel+''+stklabel+'(stockdate date,stockopen number,stockhigh number,stocklow number,stockclose number)';
7 dbexecute(sql1);
8 end else begin
9 sql2:='insert into '+marketlabel+''+stklabel+'(stockdate,stockopen,stockhigh,stocklow,stockclose) values("'+numtostr(year,0)+'/'+numtostr(month,0)+'/'+numtostr(day,0)+'",'+numtostr(open,0)+','+numtostr(high,0)+','+numtostr(low,0)+','+numtostr(close,0)+')';
10 dbexecute(sql2);
11 end;
12
拷贝版:
runmode:0;
database('provider=microsoft.jet.oledb.4.0;data source=d:\dbdemo\test.mdb');
if barpos=1 then begin
sql1:='create table '+marketlabel+''+stklabel+'(stockdate date,stockopen number,stockhigh number,stocklow number,stockclose number)';
dbexecute(sql1);
end else begin
sql2:='insert into '+marketlabel+''+stklabel+'(stockdate,stockopen,stockhigh,stocklow,stockclose) values("'+numtostr(year,0)+'/'+numtostr(month,0)+'/'+numtostr(day,0)+'",'+numtostr(open,0)+','+numtostr(high,0)+','+numtostr(low,0)+','+numtostr(close,0)+')';
dbexecute(sql2);
end;
[此贴子已经被作者于2010-12-15 22:25:25编辑过]