Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Trigger to Update the MS-DOS date modified?

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-12-07 : 09:29:15
Bill writes "I need to write a trigger that will update the MS-DOS date modified field on a file that sits on our file server. For example if a column is modified in atable then trigger something to update the MS-DOS date modified field of a file where the file name = the file name column. Can this be done? Thanks."

robvolk
Most Valuable Yak

15732 Posts

Posted - 2001-12-07 : 09:50:21
Other that deleting and recreating the file, I'm not aware of a way to do this, except to use Windows API calls. You would probably have to write your own ActiveX DLL using these functions, and write a COM layer to invoke them. Then you can use the sp_OA system procedures to create your COM object in a SQL stored procedure and call the methods. Check Books Online for details on the "sp_OA" procedures.

This site is a GREAT resource for Win API functions. Sadly it's been shut down, so you might want to download the site as the author suggests, or check some of the references he provided.

http://www.vbapi.com/

Go to Top of Page
   

- Advertisement -