GARANTIR DESCONTO

Fórum conversão de bcos diferentes #178974

01/09/2003

0

Olá pessoal, estou enrolado numa dúvida que gostaria muito de solucionar.
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

Mlee

Responder

Posts

01/09/2003

Mlee

up


Responder

Gostei + 0

01/09/2003

Mlee

up2


Responder

Gostei + 0

01/09/2003

Aroldo Zanela

Coloca um fragmento do código que está falhando pra gente verificar.


Responder

Gostei + 0

01/09/2003

Mlee

oi, espero que dê pra entender.....

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......


Responder

Gostei + 0

01/09/2003

Aroldo Zanela

Colega,

[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;



Responder

Gostei + 0

Utilizamos cookies para fornecer uma melhor experiência para nossos usuários, consulte nossa política de privacidade.

Aceitar