
以下内容为程序代码:
1 runmode:1;
2
3 dbfilepath:='e:\Trade.mdb';
4
5 cnstring:='provider=microsoft.jet.oledb.4.0;data source='+dbfilepath;
6
7 database(cnstring);
8
9 sql1:='create table tradedetail(opendate datetime,'+'contractname varchar,'+'opentime datetime,'+'openprice real,'+'tradetype varchar,'+'closetime datetime,'+
10 'closeprice real,'+'winlosspoint int,'+'lots int,'+'commissions real,'+'closewinloss real,'+'asset real,'+'strategy varchar)';
11 dbexecute(sql1);
12
13
14
database(cnstring);里不能使用变量,只能是绝对的数据库连接字符串