Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Stored procedure for edit log
Message
 
 
À
13/11/2008 16:01:07
Information générale
Forum:
Visual FoxPro
Catégorie:
Visual FoxPro et .NET
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Divers
Thread ID:
01361756
Message ID:
01361830
Vues:
13
I think I misunderstood you. I thought you were talking about SQL Server triggers and SP. In the triggers in DBC you're sitting on the right record (updated or inserted) and can read values from that table directly using field names.

>>>I have pondered this question before but never found a satisfactory answer. Perhaps someone can help now. I and reworking an old app to make it available on the web via .NET. The DBC has a stored procedure that logs before and after values when any edits are made to the tables. The SP is triggered via triggers in the tables so it is all automatic. In addition to the edit info the log keeps the date and time and the username of the person making the edit. Username is provided by a public variable initiated at logon. In the web app the username will be stored in a session variable in a similar fashion. My question is . . . What modifications will I need to make to enable the same logging from the web app? IE Will I have to drop the triggers in order to pass the username explicitly? How can I pass the username to the SP if the triggers are still in place? etc.
>>>
>>>Any advice/insights will be appreciated.
>>>Thanks
>>
>>Use T-SQL functions instead. See http://forums.asp.net/t/1347817.aspx
>>
>>Actually, this is not going to work, I take it back.
>>
>>In the trigger code you can access just updated info using new OUTPUT clause in SQL Server 2005. Research on this.
>
>Um. . . I really don't have time on this one to learn SQL Server right now. And btw-do you know if Output is supported in the Express version?
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform