Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I retain the creation and modification dates of objects

Status
Not open for further replies.

nagyf

Programmer
May 9, 2001
74
0
0
HU
Consider the case that you have a damaged database but you can import its objects to a new empty one. In case of importing an object its creation date and LastUpdated property are set to the current time. Next day you see all objects having the same creation date (within the duration of the importing process), so you lose the information when you have really modified and created the modules, forms, so on.

How can I retain the creation and modification dates of the database objects when I import them?

Can I set these properties to a past date programatically?

I plan this solution:
1. Read the true system date and time.
In a cycle for each objects to be imported:
2. Read the modifiaction date of the actual object.
3. Set the system date back to the read date.
4. Import the actual object.
Repeat steps #2-4.
5. Reset the system date and time to its true value.

How can I do step #3?
How can I set the system date back to the value read in step#2 programmatically? Is there any Visual Basic object or an API call for date and time setting? [tt]
Ferenc Nagy
|\ /~ ~~|~~~ nagyf@alpha0.iki.kfki.hu Fax: (36-1)-392-2529 New!
| \ | | Institute of Isotope and Surface Chemistry
| \ | -+- 1525 Bp. POB 77. Tel. :(36-1)-392-2550
| \| | `-' ' `-' "The goal of the life is the struggle itself"
[/tt]
 
Possible other fudge workaround: put the objects you want to retain info on in a Group (Favorites is fine). Then after compaction/repair although the dates on your objects are screwed the dates on the shortcuts in Favorites is unchanged.

NOTE: the shortcuts you create in a Group won't pick up the modified date for subsequently modified edits. Is this a problem? [pc2]
 
What is that Group?
I know Groups as groups of users of workgroup administrator.

I simplify my question:
Which Windows API function sets the system date and time? [tt]
Ferenc Nagy
|\ /~ ~~|~~~ nagyf@alpha0.iki.kfki.hu Fax: (36-1)-392-2529 New!
| \ | | Institute of Isotope and Surface Chemistry
| \ | -+- 1525 Bp. POB 77. Tel. :(36-1)-392-2550
| \| | `-' ' `-' "The goal of the life is the struggle itself"
[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top