procedure TForm1.PrepareProfiles;
var db: Database;
td: TableDef;
begin
if __DBEngine35 = nil then CreateEngine (Dao35, '');
db := __DBEngine35.CreateDatabase (ExtractFilePath (Application.ExeName)
+ 'User.mdb', ';LANGID=0x0804;CP=936;COUNTRY=0;pwd=123', 0);
td := db.CreateTableDef ('UserInfo', 0, '', '');
td.Fields.Append(td.CreateField ('UID', dbLong,0)); //用户唯一性索引
td.Fields['UID'].Set_Attributes(dbAutoIncrField);
//DELPHI 支持的DAO数据格式
td.Fields.Append(td.CreateField ('dbBoolean',dbBoolean,0));
td.Fields.Append(td.CreateField ('dbByte',dbByte,0));
td.Fields.Append(td.CreateField ('dbInteger',dbInteger,0));
td.Fields.Append(td.CreateField ('dbLong',dbLong,0));
td.Fields.Append(td.CreateField ('dbCurrency',dbCurrency,0));
td.Fields.Append(td.CreateField ('dbSingle',dbSingle,0));
td.Fields.Append(td.CreateField ('dbDouble',dbDouble,0));
td.Fields.Append(td.CreateField ('dbDate',dbDate,0));
td.Fields.Append(td.CreateField ('dbBinary',dbBinary,0));
td.Fields.Append(td.CreateField ('dbText',dbText,0));
td.Fields.Append(td.CreateField ('dbLongBinary',dbLongBinary,0));
td.Fields.Append(td.CreateField ('dbMemo',dbMemo,0));
//以下数据类型都会出错
//td.Fields.Append(td.CreateField ('dbGUID',dbGUID,0));
//td.Fields.Append(td.CreateField ('dbBigInt',dbBigInt,3));
//td.Fields.Append(td.CreateField ('dbVarBinary',dbVarBinary,0));
//td.Fields.Append(td.CreateField ('dbChar',dbChar,2));
//td.Fields.Append(td.CreateField ('dbNumeric',dbNumeric,4));
//td.Fields.Append(td.CreateField ('dbDecimal',dbDecimal,0));
//td.Fields.Append(td.CreateField ('dbFloat',dbFloat,0));
//td.Fields.Append(td.CreateField ('dbTime', dbTime,0));
//td.Fields.Append(td.CreateField (' dbTimeStamp',dbTimeStamp,0));
db.TableDefs.Append (td);
db.Close;
end;