Copiar dados de Tabela
12/02/2003
0
Olá Amigos preciso Criar uma tabela Temporaria para exportação de dados com as mesmas caracteristica de uma Fixa e copia todos os valores para a temporaria como faço?
Ex. Tenho Cliente.db, dados.db e quero criar uma temporaria Xcliente.db,Xdados.db
alguem pode me ajudar?
Paulo :roll:
Ex. Tenho Cliente.db, dados.db e quero criar uma temporaria Xcliente.db,Xdados.db
alguem pode me ajudar?
Paulo :roll:
Anonymous
Curtir tópico
+ 0
Responder
Posts
12/02/2003
Skaarj
Qunaod precisei fazer isso, fiz uma copia da tabela original e renomeei, dae fiz assim:
Na table 1 eu tnha
CAMPO1=STRING;
CAMPO2:STRING;
CAMPO3:INTEGER;
esvaziei a table2
Dae coloqei 1 botao no form e dentro dele o seguint:
table1.first;
while not table1.eof do
begin
table2CAMPO1.asstring:=table1CAMPO1.asstring;
table2CAMPO2.asstring:=table1CAMPO2.asstring;
table2CAMPO1.value:=table1CAMPO1.value;
table1.next;
end;
table2.refresh;
Ae vai copiar registro a registro..
Pra esvaziar a tabela 2:
table2.first;
while not table2.eof do
begin
table2.delete;
end;
Na table 1 eu tnha
CAMPO1=STRING;
CAMPO2:STRING;
CAMPO3:INTEGER;
esvaziei a table2
Dae coloqei 1 botao no form e dentro dele o seguint:
table1.first;
while not table1.eof do
begin
table2CAMPO1.asstring:=table1CAMPO1.asstring;
table2CAMPO2.asstring:=table1CAMPO2.asstring;
table2CAMPO1.value:=table1CAMPO1.value;
table1.next;
end;
table2.refresh;
Ae vai copiar registro a registro..
Pra esvaziar a tabela 2:
table2.first;
while not table2.eof do
begin
table2.delete;
end;
Responder
Clique aqui para fazer login e interagir na Comunidade :)