以文本方式查看主题

-  金字塔客服中心 - 专业程序化交易软件提供商  (http://222.73.7.161/bbs/index.asp)
--  公式模型编写问题提交  (http://222.73.7.161/bbs/list.asp?boardid=4)
----  [原创]创建db table  (http://222.73.7.161/bbs/dispbbs.asp?boardid=4&id=4859)

--  作者:z7c9
--  发布时间:2011/1/17 13:31:19
--  [原创]创建db table

以下内容为程序代码:

1 runmode:1;
2
3 database(\'provider=microsoft.jet.oledb.4.0;data source=Trade.mdb\');
4
5 sql1:=\'create table tradedetail(opendate datetime,\'+\'contractname varchar,\'+\'opentime datetime,\'+\'openprice real,\'+\'tradetype varchar,\'+\'closetime datetime,\'+
6              \'closeprice real,\'+\'winlosspoint int,\'+\'lots int,\'+\'commissions real,\'+\'closewinloss real,\'+\'asset real,\'+\'strategy varchar)\';        
7 dbexecute(sql1);

 

 

 

runmode:1;

database(\'provider=microsoft.jet.oledb.4.0;data source=Trade.mdb\');

sql1:=\'create table tradedetail(opendate datetime,\'+\'contractname varchar,\'+\'opentime datetime,\'+\'openprice real,\'+\'tradetype varchar,\'+\'closetime datetime,\'+
\'closeprice real,\'+\'winlosspoint int,\'+\'lots int,\'+\'commissions real,\'+\'closewinloss real,\'+\'asset real,\'+\'strategy varchar)\';
dbexecute(sql1);

[此贴子已经被作者于2011-1-17 13:31:38编辑过]

--  作者:z7c9
--  发布时间:2011/1/17 21:31:19
--  

以下内容为程序代码:

1 if debug=1 then begin
2     database(\'provider=microsoft.jet.oledb.4.0;data source=Analysis.mdb\');
3     if barpos=1 then begin              
4         sql1:=\'create table tradedetail(opendate datetime,\'+
5                      \'contractname text,\'+
6                      \'opentime datetime,\'+
7                      \'openprice number,\'+
8                      \'tradetype text,\'+
9                      \'closetime datetime,\'+
10                      \'closeprice number,\'+
11                      \'winlosspoint number,\'+
12                      \'lots number,\'+
13                      \'commissions number,\'+
14                      \'closewinloss number,\'+
15                      \'asset number,\'+
16                      \'strategy text)\';        
17         dbexecute(sql1);
18         
19         sql2:=\'create table myasset(tradedate datetime,\'+
20                      \'asset number)\';    
21         dbexecute(sql2);        
22     end    
23 end

 

 

if debug=1 then begin
database(\'provider=microsoft.jet.oledb.4.0;data source=Analysis.mdb\');
if barpos=1 then begin
sql1:=\'create table tradedetail(opendate datetime,\'+
\'contractname text,\'+
\'opentime datetime,\'+
\'openprice number,\'+
\'tradetype text,\'+
\'closetime datetime,\'+
\'closeprice number,\'+
\'winlosspoint number,\'+
\'lots number,\'+
\'commissions number,\'+
\'closewinloss number,\'+
\'asset number,\'+
\'strategy text)\';
dbexecute(sql1);

sql2:=\'create table myasset(tradedate datetime,\'+
\'asset number)\';
dbexecute(sql2);
end
end