{"id":33,"date":"2007-08-28T16:36:00","date_gmt":"2007-08-28T16:36:00","guid":{"rendered":"http:\/\/www.webmundi.com\/?p=33"},"modified":"2020-08-18T16:36:53","modified_gmt":"2020-08-18T19:36:53","slug":"compactando-tabelas-paradox-no-delphi","status":"publish","type":"post","link":"http:\/\/localhost\/cmswebmundicom\/desenvolvimento-de-sistemas\/compactando-tabelas-paradox-no-delphi\/","title":{"rendered":"Compactando tabelas Paradox no Delphi"},"content":{"rendered":"
Compactando tabelas Paradox no Delphi<\/p>\n
procedure ParadoxPack(Table : TTable);
\nvar
\nTBDesc : CRTblDesc;
\nhDb: hDbiDb;
\nTablePath: array[0..dbiMaxPathLen] of char;
\nbegin
\nFillChar(TBDesc,Sizeof(TBDesc),0);
\nwith TBDesc do begin
\nStrPCopy(szTblName,Table.TableName);
\nStrPCopy(szTblType,szParadox);
\nbPack := True;
\nend;
\nhDb := nil;
\nCheck(DbiGetDirectory(Table.DBHandle, True, TablePath));
\nTable.Close;
\nCheck(DbiOpenDatabase(nil, ‘STANDARD’, dbiReadWrite, dbiOpenExcl,nil,0, nil, nil, hDb));
\nCheck(DbiSetDirectory(hDb, TablePath));
\nCheck(DBIDoRestructure(hDb,1,@TBDesc,nil,nil,nil,False));
\nTable.Open;
\nend;<\/p>\n
Para compactar tabelas Dbase use o seguinte comando:<\/p>\n
DBIPackTable(Table1.DBHandle,Table1.Handle,nil,nil,True);<\/p>\n","protected":false},"excerpt":{"rendered":"
Compactando tabelas Paradox no Delphi procedure ParadoxPack(Table : TTable); var TBDesc : CRTblDesc; hDb: hDbiDb; TablePath: array[0..dbiMaxPathLen] of char; begin…<\/p>\n","protected":false},"author":2,"featured_media":29222,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_kadence_starter_templates_imported_post":false,"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"footnotes":""},"categories":[9,13],"tags":[27,28,14],"class_list":["post-33","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-delphi","category-desenvolvimento-de-sistemas","tag-delphi","tag-desenvolvimento-de-sistemas","tag-programacao"],"yoast_head":"\n