RE:Copiar una Tabla Urge!
Hola Octavio. Utiliza esto.Si te da algun error repasa el codigo y las variables ya que lo he escrito deprisa y me he podido equivocar
Otro dia te mando como borrar una tabla de la misma forma.
Añadir al uses DB,DBTables,DbiProcs,DbiErrs y DbiTypes
procedure TForm1.copyTable(FromDir,SrcTblName,ToDir,DestTblname:String);
var
DBHandle: HDBIDB;
ResultCode: DBIRESULT;
Src,Dest,Err: Array [0..255] of char;
SrcTbl,DestTbl:TTable;
begin
SrcTbl:=TTable.Create(Application);
DestTbl:=TTable.Create(Application);
try
SrcTbl.Databasename:=FromDir;
SrcTbl.Tablename:=SrcTblName;
SrcTbl.Open;
DBHandle:=SrcTbl.DBHandle;
SrcTbl.Close;
ResultCode:=DBiCopyTable(DBHandle,false,StrPCopy(Src,FronDir+'\'+SrcTblNa
me),nil,StrPCopy(Dest,ToDir+'\'+DestTblName));
id (ResultCode<>DBIERR_NONE) then
begin
DBiGetErrorString(ResultCode,Err);
raise EDatabaseError. Create ('Mientras se copiaba la
tabla'+FromDir'\'+SrcTblName+' a '+ToDir+'\'+DestTblName+'El BDE gereró
el siguiente error ?+StrPas(Err)+'''');
end;
finally
SrcTbl.Dree;
DestTbl.Free;
end;
end;