Fórum conversão de bcos diferentes #178974
01/09/2003
0
Tenho dois bcos em interbase, e gostaria de trasferir do Cadastro de Clientes de um para o outro, fiz um programinha, mas é muito registro e sempre trava e não continua, será que não existe uma maneira mais fácil de fazer isso, pelo interbase por exemplo, sei lá!!
Me ajudem!! Valeu!
:)
Mlee
Curtir tópico
+ 0Posts
01/09/2003
Mlee
Gostei + 0
01/09/2003
Mlee
Gostei + 0
01/09/2003
Aroldo Zanela
Gostei + 0
01/09/2003
Mlee
Shopp.QyClientes.First;
while not Shopp.QyClientes.Eof do
begin
if not Pegou( Novo.QyClientes,´CGCCLIE´,Shopp.QyClientesCGCCLIE.Value],´´,false) then
begin
Novo.QyClientes.Append;
Novo.QyClientesCGCCLIE.Value := Shopp.QyClientesCGCCLIE.Value;
Novo.QyClientesRAZAO.Value := Shopp.QyClientesRAZAO.Value;
Novo.QyClientesENDERECO.Value := Shopp.QyClientesENDERECO.Value;
Novo.QyClientesNUMERO.Value := Shopp.QyClientesNUMERO.Value;
Novo.QyClientesCOMPLEMENTO.Value := Shopp.QyClientesCOMPLEMENTO.Value;
Etc....(todos os campos)
Novo.QyClientes.Post;
GravaQuery(Novo.Database,Novo.QyClientes);
end;
Shopp.QyClientes.Next;
G1.Progress := G1.Progress + 1;
end;
já agradeço só por ter examindo......
Gostei + 0
01/09/2003
Aroldo Zanela
[quote:961c8792a4=´Delphi6 - Help´]
Assume that you have two IBDatabase connections with an IBSQL component associated with each (named IBSQL1 and IBSQL2, here). The connections are active and transactions started. The columns described by the select statement and the insert statement must be of the same size and type for a ´RAW´ transfer.
Here is a raw file conversion example:
[/quote:961c8792a4]
procedure TForm1.Button1Click(Sender: TObject); var Filename : String; RawOutput : TIBOutputRawFile; RawInput : TIBInputRawFile; begin IBSQL1.Sql.Text := ´Select firstname, lastname from people´; IBSQL2.Sql.Text := ´Insert into people (firstname, lastname) values (:first, :last)´; Filename := ´DataFile.RAW´; RawOutput:= TIBOutputRawFile.Create; try RawOutput.FileName := FileName; IBSQL1.BatchOutput(RawOutput); finally RawOutput.Free; end; RawInput := TIBInputRawFile.Create; try RawInput.FileName := FileName; IBSQL2.BatchInput(RawInput); finally RawInput.Free; end; IBSQL2.Transaction.CommitRetaining; end;
Gostei + 0
Clique aqui para fazer login e interagir na Comunidade :)