Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Atualizando banco de dados
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00611428
Message ID:
00612051
Views:
32
Ok! :P

Eu fiz um sistema (para um amigo e não fiquei com o código-fonte) que analisava o banco de dados e gerava um arquivo do tipo:
Use Clientes
If ExisteCampo("Codigo")
    If TipoDiferente("Codigo") or TamanhoDiferente("Codigo")
         Alter Table para atualizar o tipo / tamanho
    EndIf
Else
    Alter Table para criar o campo
EndIf
If CampoExcluido("Codigo")
    Alter Table para excluir o campo
EndIf
O código acima é apenas um exemplo - o meu não era bem assim - e funciona belezinha!

Vou pegar um dia e fazê-lo novamente.

[]s
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Rodolfo Duarte
Previous
Reply
Map
View

Click here to load this message in the networking platform