Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Creating a trigger / stored procedure
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00947396
Message ID:
00947800
Vues:
12
Hi,
VFP doesn't support APPEND PROCUDERE command at runtime. You need to "hack" into database file in order to do this.

*NOTE: Backup your database before try this code
PROCEDURE AppendProcedure(tcDBC As String, tcSPFile As String)

USE (tcDBC) AGAIN SHARED ALIAS tmpData IN 0
			
SELECT tmpData			
LOCATE FOR ObjectType = "Database" AND ObjectName = "StoredProceduresSource"
IF FOUND()
   REPLACE Code WITH Code + FILETOSTR(tcSPFile)
ENDIF
			
USE IN SELECT("tmpData")
ENDFUNC
HTH
I am not the most powerful man in this world.
I am not the worst man in this world either.
I just as same as all of you.
I still need to learn from my mistakes...
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform