friends,
using TDOLPHIN, someone would have an example to compare and update table in MYSQL?
thank you
friends,
using TDOLPHIN, someone would have an example to compare and update table in MYSQL?
thank you
hello
sorry, but i dont undertstand what do you need...
compare two entire tables? compare if a record was modify? compare values?
Algo assim:
for n := 1 to len(aAlteracoes)
cQuery := "ALTER TABLE " + cTabela + " "
do Case
case aAlteracoes[n,'nProcedimento'] == ATUALIZACAO_CAMPO_EXCLUIDO
cQuery += "DROP COLUMN `" + Alltrim(aAlteracoes[n,'cNome']) + "`"
case aAlteracoes[n,'nProcedimento'] == ATUALIZACAO_CAMPO_ALTERADO
cQuery += "MODIFY COLUMN " + DefinicaoColuna(aAlteracoes[n]) + " " + PosicaoColuna(aAlteracoes[n, 'cCampoAnterior'])
case aAlteracoes[n,'nProcedimento'] == ATUALIZACAO_CAMPO_INCLUIDO
cQuery += "ADD COLUMN " + DefinicaoColuna(aAlteracoes[n]) + " " + PosicaoColuna(aAlteracoes[n, 'cCampoAnterior'])
otherwise
loop
endcase
//QUERY
if !M->oServer:Execute(cQuery)
MsgStop('NĂŁo foi possĂvel atualizar a tabela: '+cTabela+CRLF+CRLF+'Query: '+cQuery,'Atenção!')
endif
next
Hello
sorry, but dolphin haven't method to compare two tables structures.... you can do same way that above example
yes, I'm implementing...
thanks