Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Criando um Log
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Criando um Log
Divers
Thread ID:
00827941
Message ID:
00827941
Vues:
48
Estou criando um log de atualizações feitas nas tabelas, para isto criei uma stored procedute como a seguir :
FUNCTION MinhaTabela_update()

   lnFim    = ASTACKINFO( laStack )
   lcString = ''
   lcString = TRANSFORM(laStack( lnFim,1 ))+ ' ' + TIME() + CHR(13)+CHR(10) +;
              laStack( lnFim,2 )+CHR(13)+CHR(10) +; 
              laStack( lnFim,3 )+CHR(13)+CHR(10) +; 
              laStack( lnFim,4 )+CHR(13)+CHR(10) +; 
              TRANSFORM(laStack( lnFim,5 ))+CHR(13)+CHR(10) +;
              laStack( lnFim,6 )+CHR(13)+CHR(10)+CHR(13)+CHR(10)
		
   lcArq = [CLI] + PADL( DAY(DATE()),2,[0] ) + PADL( MONTH(DATE()),2,[0]) + [.log]
   STRTOFILE(lcString,lcArq,.T.)
   
   RETURN .T.
ENDPROC 
Fica tudo muito bom, mas não consigo saber quem fez a atualização se foi uma comm ou form ou um prg. pois a ASTACKINOF, quando dentro de uma S.P. so retorna os dados da mesma. Alguém teria uma alternativa ?
Paulo Cesar Carneiro
desenvolvimento@controplan.com.br


"My God, what have we done?"
-- Capt. Robert Lewis, co-pilot of the Enola Gay, recalling the moment the atomic bomb exploded over Hiroshima

At 8:15 a.m. on August 6 1945
Répondre
Fil
Voir

Click here to load this message in the networking platform