G
guizhou
Unregistered / Unconfirmed
GUEST, unregistred user!
我写了一段程序如下:
DBIResult result;
if ((result=DbiInit(NULL))!=DBIERR_NONE)
Button1->Caption="初始化失败";
hDBISes hSession;
DbiStartSession("NewSession",hSession,"");//创建新的任务
hDBIDb hDb;
if ((result=DbiOpenDatabase("BCDEMOS","STANDARD",dbiREADWRITE,dbiOPENSHARED,NULL,
0,NULL,NULL,hDb))!=DBIERR_NONE)
Button1->Caption="打开数据库失败";
CRTblDesc *TableDesc=new CRTblDesc;
FLDDesc *FieldDesc=new FLDDesc;
memset((void *)TableDesc,0,sizeof(CRTblDesc));
StrCopy(TableDesc->szTblName,"Test");
StrCopy(TableDesc->szTblType,"szPARADOX");
TableDesc->bProtected=false;
TableDesc->iFldCount=1;
TableDesc->pfldDesc=FieldDesc;
FieldDesc->iFldNum=1;
StrCopy(FieldDesc->szName,"One");
FieldDesc->iFldType=0x101;
FieldDesc->iLen=10;
if ((result=DbiCreateTable(hDb,true,*TableDesc))!=DBIERR_NONE)
Button1->Caption=AnsiString(result);
delete TableDesc;
delete FieldDesc;
DbiExit();
清高收指点一下.我的积分不多了,就不全部拿了出来.
小子我先谢谢了 !
DBIResult result;
if ((result=DbiInit(NULL))!=DBIERR_NONE)
Button1->Caption="初始化失败";
hDBISes hSession;
DbiStartSession("NewSession",hSession,"");//创建新的任务
hDBIDb hDb;
if ((result=DbiOpenDatabase("BCDEMOS","STANDARD",dbiREADWRITE,dbiOPENSHARED,NULL,
0,NULL,NULL,hDb))!=DBIERR_NONE)
Button1->Caption="打开数据库失败";
CRTblDesc *TableDesc=new CRTblDesc;
FLDDesc *FieldDesc=new FLDDesc;
memset((void *)TableDesc,0,sizeof(CRTblDesc));
StrCopy(TableDesc->szTblName,"Test");
StrCopy(TableDesc->szTblType,"szPARADOX");
TableDesc->bProtected=false;
TableDesc->iFldCount=1;
TableDesc->pfldDesc=FieldDesc;
FieldDesc->iFldNum=1;
StrCopy(FieldDesc->szName,"One");
FieldDesc->iFldType=0x101;
FieldDesc->iLen=10;
if ((result=DbiCreateTable(hDb,true,*TableDesc))!=DBIERR_NONE)
Button1->Caption=AnsiString(result);
delete TableDesc;
delete FieldDesc;
DbiExit();
清高收指点一下.我的积分不多了,就不全部拿了出来.
小子我先谢谢了 !