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?
I simplify my question:
Which Windows API function sets the system date and time?
Where can I read about its usage?
TIA
[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]
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?
I simplify my question:
Which Windows API function sets the system date and time?
Where can I read about its usage?
TIA
[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]