Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Automatically insert the server's datetime
Message
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00513068
Message ID:
00513266
Views:
11
Sorry, but I don't know how you would figure out what the current record is in SQL Server. I know how to do it in VFP, but since SQL Server is set-based, I can't figure it out. If someone here or in the SQL Server forum knows the answer, they might be able to help you further.

However, as I mentioned before, if you put the GetDate() into the update command you pass to SQL Server or in your SP, that would fix your problem also.

>>Keep in mind, however, that will only take care of inserted records. To update existing records, simply place the GetDate() function in your update command for your datetime field.
>>
>>i.e.: SQLExec(lnHandle, "Update TableName Set DateTimeField=GetDate() Where Condition")
>>
>>That should take care of the updates for you.
>>
>Yes, you're right. But is there a way to set a trigger to update only the update records?
>
>The 'CREATE TRIGGER FOR UPDATE' updates all the records with the new datetime.
>
>Can you help?
>
>Thank you.
Travis Vandersypen
Previous
Reply
Map
View

Click here to load this message in the networking platform