OpenTokens™: %DB(CREATE)%
Return to Introduction  Previous page  Next page

%DB(CREATE)% tokens will create a new database file, using the specified parameters. They use following token format:

%DB(CREATE|dbalias|filename|fields|type)%  
 
Parameters  
·CREATE   required   literal   action code  
·dbalias      required   literal   MivaScript database alias name  
·filename   required   literal   filename to use for the database  
·fields      required   literal   array of fields and field types  
·type      optional   literal   database type (defaults to 'xbase3')  
 
 
Example: To create a new xbase3 database called "NewData" using the filename of "newdata.dbf", use

%DB(CREATE|NewData|newdata.dbf|testfld1 CHAR(10), testfld2 NUMBER)%  
 
or  
 
%DB(CREATE|NewData|newdata.dbf|testfld1 CHAR(10), testfld2 NUMBER|xbase3)%  

Example: To create a new MytSQL database (using the OpenDB by CopernicusLLC.com
) called "NewSqlData" using the filename of "newsqldata.dbf", use

%DB(CREATE|NewSqlData|newsqldata.dbf|testfld1 CHAR(10), testfld2 NUMBER|opendb_mysql)%  

For more information, see <MvCREATE> in the Miva Script Guide v4.x -- <MvCREATE>
.




 


Send feedback on this documentation.
© 2004 - 2000 Darren Ehlers & OpenUI Developer Consortium