Results 1 to 14 of 14
  1. #1
    moke123's Avatar
    moke123 is offline Me.Dirty=True
    Windows 11 Office 365
    Join Date
    Oct 2012
    Location
    Ma.
    Posts
    1,651

    Odd issue with file Created Date

    I have a temp database, a/k/a side database, that I use for temp tables.
    I was toying with the idea of deleting and re-creating the temp database periodically.
    To do this I figured I'd use the created date of the Temp database and if it were older than a certain period of time delete and re-create it.

    On my home computer, win 11 home & office 365, when I would delete and re-create the temp db it would retain the old created date from the deleted file.
    It is clearly a new file but bears the old date. I've tried numerous different things like refreshing tableDefs, etc. but nothing changes this behavior.

    On my office computer, win 10 pro & office 365, when I re-create the temp db it does have a new created date as expected.



    I've attached a db to demonstrate how I process the temp db. This includes a procedure to reset the created date to an earlier time.

    Any thoughts or ideas on why this occurs?
    Attached Files Attached Files
    If this helped, please click the star * at the bottom left and add to my reputation- Thanks

  2. #2
    Minty is offline VIP
    Windows 10 Office 365
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,003
    Have you tried renaming the old one, creating a new one then deleting the old (renamed) one?
    I think this is something to do with a helpful tracking (file history?) function in Win11.

    I'm afraid I can't test as my Win 11 laptop (spare) is currently on holiday with my daughter enjoying her normal one being broken.
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

  3. #3
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,791
    Are you referring to file properties as seen in Windows or properties of the database object?
    WRT file properties, we saw this behaviour years ago when attempting to use file date properties to id files by file date properties. IIRC, modified dates could even be older than create dates so we abandoned the idea.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  4. #4
    moke123's Avatar
    moke123 is offline Me.Dirty=True
    Windows 11 Office 365
    Join Date
    Oct 2012
    Location
    Ma.
    Posts
    1,651
    I think this is something to do with a helpful tracking (file history?) function in Win11.
    File history is turned off on both machines(by default)

    Have you tried renaming the old one, creating a new one then deleting the old (renamed) one?
    I'll give this a shot when I get home tonight.

    Edit: Remoted to home machine and the name change appears to work.
    May be an easier work around rather than changing the created date via code. The code to change the created date takes up 2 modules.
    If this helped, please click the star * at the bottom left and add to my reputation- Thanks

  5. #5
    moke123's Avatar
    moke123 is offline Me.Dirty=True
    Windows 11 Office 365
    Join Date
    Oct 2012
    Location
    Ma.
    Posts
    1,651
    Unfortunately rename and delete didn't work.

    I didn't see anything that jumps out at me in the hidden and system tables.
    It does appear that any tables added to the temp database remain in MySysNameMap table.
    If this helped, please click the star * at the bottom left and add to my reputation- Thanks

  6. #6
    moke123's Avatar
    moke123 is offline Me.Dirty=True
    Windows 11 Office 365
    Join Date
    Oct 2012
    Location
    Ma.
    Posts
    1,651
    Quote Originally Posted by Micron View Post
    Are you referring to file properties as seen in Windows or properties of the database object?
    WRT file properties, we saw this behaviour years ago when attempting to use file date properties to id files by file date properties. IIRC, modified dates could even be older than create dates so we abandoned the idea.
    Weird, this didn't show up until now.

    WRT? windows runtime?

    I believe the code I'm using from Chip Pearson uses windows API's to read and write to the file properties.

    The odd thing is how it works correctly on work computer and not on home computer.
    If this helped, please click the star * at the bottom left and add to my reputation- Thanks

  7. #7
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,791
    With Respect To
    or
    in regards to, or re:
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  8. #8
    moke123's Avatar
    moke123 is offline Me.Dirty=True
    Windows 11 Office 365
    Join Date
    Oct 2012
    Location
    Ma.
    Posts
    1,651
    Quote Originally Posted by Micron View Post
    With Respect To
    or
    in regards to, or re:
    Ah ok, you kids and your acronyms
    If this helped, please click the star * at the bottom left and add to my reputation- Thanks

  9. #9
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,791
    I'm no kid. Lots of candles on my birthday cakes now. That is, IIRC.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  10. #10
    moke123's Avatar
    moke123 is offline Me.Dirty=True
    Windows 11 Office 365
    Join Date
    Oct 2012
    Location
    Ma.
    Posts
    1,651
    Quote Originally Posted by micron View Post
    i'm no kid. Lots of candles on my birthday cakes now. That is, iirc.
    ikt, lol
    If this helped, please click the star * at the bottom left and add to my reputation- Thanks

  11. #11
    Minty is offline VIP
    Windows 10 Office 365
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,003
    Quote Originally Posted by moke123 View Post
    Unfortunately rename and delete didn't work.

    I didn't see anything that jumps out at me in the hidden and system tables.
    It does appear that any tables added to the temp database remain in MySysNameMap table.
    Once removed if you compact and repair the Side DB do they disappear?
    You could set a side DB to compact on close?
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

  12. #12
    moke123's Avatar
    moke123 is offline Me.Dirty=True
    Windows 11 Office 365
    Join Date
    Oct 2012
    Location
    Ma.
    Posts
    1,651
    I found a work around which is probably better than my original thoughts on this, but I'd still like to know why the differences on the 2 machines.

    My work around is to set a custom property for the temp database when created.
    Then I can just test whether Date > the custom property.

    Code:
        Dim p As Property
        Set p = TDB.CreateProperty("Expiry", dbDate, DateAdd("d", 30, Date))
        TDB.Properties.Append p
    If this helped, please click the star * at the bottom left and add to my reputation- Thanks

  13. #13
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,791
    Quote Originally Posted by moke123 View Post
    My work around is to set a custom property for the temp database when created.
    Then I can just test whether Date > the custom property.
    I wonder who or what planted that idea seed?

    Are you referring to file properties as seen in Windows or properties of the database object?
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  14. #14
    moke123's Avatar
    moke123 is offline Me.Dirty=True
    Windows 11 Office 365
    Join Date
    Oct 2012
    Location
    Ma.
    Posts
    1,651
    Attached Demo of what I came up with.

    Quote Originally Posted by Micron View Post
    I wonder who or what planted that idea seed?
    I'm no kid. Lots of candles on my birthday cakes now. That is, IIRC.
    Not bad for an old guy

    Click image for larger version. 

Name:	candles.jpg 
Views:	12 
Size:	94.5 KB 
ID:	49628
    Attached Files Attached Files
    If this helped, please click the star * at the bottom left and add to my reputation- Thanks

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Add File Date Created and Modified to File List
    By Macallan60 in forum Modules
    Replies: 11
    Last Post: 11-03-2022, 06:41 AM
  2. VBA file rename with a date issue
    By M.Enders in forum Programming
    Replies: 3
    Last Post: 06-28-2017, 02:28 PM
  3. Replies: 15
    Last Post: 12-07-2014, 06:22 AM
  4. Replies: 5
    Last Post: 12-18-2012, 02:37 PM
  5. How to work with .dbf file created by GIS
    By cowboy in forum Programming
    Replies: 8
    Last Post: 09-28-2010, 10:26 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums