Page 1 of 2 12 LastLast
Results 1 to 15 of 16
  1. #1
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713

    Unanswered: Running an XP DB in 2000 ...

    Hi all.

    This is a shits-and-giggles question: Please confirm for me that you cannot run/operate an Access XP db under Access 2000 ... I don't think you can because of the library changes (and potential architectural changes) ...

    Thanks!

    - Mike

    P.S. - Reason: Evaluating a potential software package that's done in XP and currently have 2000 ...

    ... AND no smirking either there Dan (pootle flump)!
    Back to Access ... ADO is not the way to go for speed ...

  2. #2
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Quote Originally Posted by M Owen
    ... AND no smirking either there Dan (pootle flump)!
    I have no idea what you mean ( )

    It depends on the db. If it is an MDE then no - you are stuck. An mdb will *probably* (unless they include some function or something that is XP + specific) work fine - if you change the library. Me and another developer once worked on the same db for some time, me in 2k and him in XP.

    I once investigated programmatically changing the library - I didn't get very far because I don't run any mdbs in prod. Might be possible to change the library through automation before opening.... use a vbs file as to do this and then open the database maybe.... Is it worth the hassle checking?

    HTH
    Testimonial:
    pootle flump
    ur codings are working excelent.

  3. #3
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Quote Originally Posted by pootle flump
    I once investigated programmatically changing the library
    ....memories surfacing.....
    I think Izy might have something about adding references to the application.references collection
    Testimonial:
    pootle flump
    ur codings are working excelent.

  4. #4
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    Quote Originally Posted by pootle flump
    I have no idea what you mean ( )

    It depends on the db. If it is an MDE then no - you are stuck. An mdb will *probably* (unless they include some function or something that is XP + specific) work fine - if you change the library. Me and another developer once worked on the same db for some time, me in 2k and him in XP.

    I once investigated programmatically changing the library - I didn't get very far because I don't run any mdbs in prod. Might be possible to change the library through automation before opening.... use a vbs file as to do this and then open the database maybe.... Is it worth the hassle checking?

    HTH
    I did the same with 2002 and 2000 ... Had to make sure to use ONLY 2000 compatible code/objects/methods then just do the ol library switcharoo and recompile ...

    BTW: my comment to you Dan was on my "shits-and-giggles" euphemism ... I thought that you might have commented on it ...
    Back to Access ... ADO is not the way to go for speed ...

  5. #5
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Quote Originally Posted by M Owen
    BTW: my comment to you Dan was on my "shits-and-giggles" euphemism ... I thought that you might have commented on it ...
    The only comment would have been WTF does that mean? Had to google it.
    Testimonial:
    pootle flump
    ur codings are working excelent.

  6. #6
    Join Date
    Mar 2005
    Posts
    261
    An Access 2002/2003 format file won't work under 2000 (- the system tables are different). You need to use the Access 2000 format, then all should be OK (2000 is the default format anyway...)

    Quote:
    Originally Posted by pootle flump
    I once investigated programmatically changing the library

    ....memories surfacing.....
    I think Izy might have something about adding references to the application.references collection
    As for the references trick, it was in this thread (only bother reading from post 24 onwards):
    [Edit: 24 not 15]

    http://www.dbforums.com/t1197551.html

    HTH
    Last edited by waynephillips; 12-09-05 at 11:20.

  7. #7
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    fortunately the problem i was fighting with got fixed with a manual workaround

    unfortunately that means that the planned "rev-independent library loader" hasn't been completed, so i can only offer you the following snippet.

    Wayne's 0,0 trick is wonderous

    Code:
    Private Function CheckLibraries() As Boolean
    
        Dim gotDAO As Boolean
        Dim gotOUT As Boolean
        Dim gotXLS As Boolean
        Dim gotOFF As Boolean
        
        Dim intRef As Integer
        Dim intXXX As Integer
        Dim strMsg As String
        
        On Error GoTo err_CheckLibraries
        
        If Application.References.Count = 0 Then
            'this is stupid - this code cannot possibly be running without VBA reference
            MsgBox "ZERO references found. Trying to continue...", vbInformation, "No References"
            'since all gotXXX are False, there is some remote hope that refs will still load
        Else
            For intRef = 1 To Application.References.Count
                Select Case Application.References(intRef).Name
                    Case "DAO"
                        gotDAO = True
                    Case "Outlook"
                        gotOUT = True
                    Case "Excel"
                        gotXLS = True
                    Case "Office"
                        gotOFF = True
                    Case Else
                        intXXX = intXXX + 1
                End Select
            Next
        End If
    
    
        'dao
        If Not gotDAO Then
            References.AddFromGuid "{00025E01-0000-0000-C000-000000000046}", 0, 0
            gotDAO = True
        End If
    
        'outlook
        If Not gotOUT Then
            References.AddFromGuid "{00062FFF-0000-0000-C000-000000000046}", 0, 0
            gotOUT = True
        End If
        
        'excel
        If Not gotXLS Then
            References.AddFromGuid "{00020813-0000-0000-C000-000000000046}", 0, 0
            gotXLS = True
        End If
        
        'office
        If Not gotOFF Then
            References.AddFromGuid "{2DF8D04C-5BFA-101B-BDE5-00AA0044DE52}", 0, 0
            gotOFF = True
        End If
        
        If gotDAO And gotOUT And gotXLS And gotOFF Then
            CheckLibraries = True
        Else
            MsgBox "Library status is " & intXXX & " misc references plus" & vbCrLf & _
                                "DAO: " & gotDAO & vbCrLf & _
                                "Outlook: " & gotOUT & vbCrLf & _
                                "Excel: " & gotXLS & vbCrLf & _
                                "Office: " & gotOFF, vbCritical, "Missing Libraries!"
            CheckLibraries = False
        End If
        
    exit_CheckLibraries:
        Exit Function
    
    err_CheckLibraries:
        MsgBox Err.Number & ": " & Err.Description, vbCritical, "ERROR in CheckLibraries()"
        CheckLibraries = False
        Resume exit_CheckLibraries
        
    End Function
    ...you will probably want to also:
    drop any existing references in case they are wrong rev
    and/or
    play with .missing

    ...addFromGuid will fail in .MDE so you will want MDB/MDE detection. here's my snippet for that (incorporating contributions from both Wayne & Pootle).

    and that points to the BIG downside - you can't set the refs without having your precious .MDB "out there" on another system. makes me shiver... which is why i went manual over netmeeting to fix my original issue: after the fix i trashed the .MDB on the user's machine

    Code:
    Private Sub Form_Load()
        Dim thisIsMDE As Boolean
        capCopyright.Caption = "Copyright" & Chr$(169) & "izyrider, 2005"
        thisIsMDE = amInMde
        If thisIsMDE Then               'if we are running in .MDE
            doSetupMDE                      'MDE-specific setup
        Else                            'otherwise
            doSetupMDB                      'MDB-specific setup
        End If
        doSetupCommon                   'remaining common setup
        If thisIsMDE Then               'if we are running .MDE
            DoCmd.OpenForm locConStartForm  'open the startup form
        Else
            MsgBox "Running MDB", vbInformation, "DEBUG"
        End If
        DoCmd.Close acForm, "frmStartup"
    End Sub
    
    Private Function amInMde() As Boolean
        'RETURNS True if we are running MDE, else False
        Dim strApp As String        'junk container for the property return
        Dim strProp As String       'the property we are checking
        strProp = "MDE"             'MDE property exists in MDE but not in MDB
        On Error GoTo gotMDB        'special error handling - checking MDE property errors in MDB
        strApp = CurrentDb.Properties(strProp)
        On Error GoTo err_amInMde   'normal error handling
        amInMde = True  'if the property exists, treat as MDE
    Exit_amInMde:
        Exit Function
    gotMDB:
        If Err.Number = 3270 Then Resume Exit_amInMde   '3270 is the missing property error
    err_amInMde:                                        'anything else is treated as a fatal error
        MsgBox Err.Number & ": " & Err.Description & vbCrLf & "Fatal error in amInMde() " _
                & "- cannot continue!", vbCritical, "ABORTING"
        DoCmd.Quit
    End Function
    izy
    Last edited by izyrider; 01-03-06 at 05:35.
    currently using SS 2008R2

  8. #8
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Quote Originally Posted by waynephillips
    An Access 2002/2003 format file won't work under 2000 (- the system tables are different). You need to use the Access 2000 format, then all should be OK (2000 is the default format anyway...)
    Ah plopper. Yes - was thinking of XP and 2k modifying the same application - forgot about the actual database format.

    Quote Originally Posted by izyrider
    ...addFromGuid will fail in .MDE so you will want MDB/MDE detection. here's my snippet for that (incorporating contributions from both Wayne & Pootle).
    I think you are underplaying my contribution quite a bit there Izy. I asked "does anyone know how a database can check if it is an mde or not?" and then Wayne-come-lately and yourself merely crossed the t's and dotted the i's with your function
    Testimonial:
    pootle flump
    ur codings are working excelent.

  9. #9
    Join Date
    Mar 2005
    Posts
    261
    Quote Originally Posted by The Flumpster
    I think you are underplaying my contribution quite a bit there Izy. I asked "does anyone know how a database can check if it is an mde or not?" and then Wayne-come-lately and yourself merely crossed the t's and dotted the i's with your function
    Wayne-come-lately says:

    crossed the t's and dotted the i's?

    I think that may be where you're going wrong Pootle... generally source code is supposed to be input into a computer... (but I could be wrong too )

    Didn't they teach you that at college? (or are you not upto that stage in the book yet )

    Hope This Helps
    Last edited by waynephillips; 12-09-05 at 13:02.

  10. #10
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    [lazily philosophical after a couple of beers]
    a question is often far more valuable than an answer
    [/lazily philosophical after a couple of beers]

    the "rev-independent library loader" idea came precisely from your question. it's waiting for some idle days over Xmas to get completed. game plan is something like a protected .MDB that can only run the loader and then make .MDE and then trash itself.

    and your very same question also gave birth to another project (happily completed): a demo licencing scheme for Access apps that terminates after coder-defined days or starts or both. MDE/MDB detection was a critical aspect (or the coder locks himself out of his own code after a while!). and that in turn sent me down the road of investigating CAPICOM which turns out to have lots of uses.

    all in all - your two-line question cost me hundreds of hours!

    izy
    currently using SS 2008R2

  11. #11
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Quote Originally Posted by waynephillips
    Wayne-come-lately says:

    crossed the t's and dotted the i's?

    I think that may be where you're going wrong Pootle... generally source code is supposed to be input into a computer... (but I could be wrong too )

    Didn't they teach you that at college? (or are you not upto that stage in the book yet )

    Hope This Helps
    Lol - either my irony detector is faulty or yours is. My point was I contributed nothing (but I did like the suggestion that I had).
    Testimonial:
    pootle flump
    ur codings are working excelent.

  12. #12
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Ah - it is my detection equipment. Just noticed I was quoted as The Flumpster - no one could precede anything but irony with that. Oops
    Testimonial:
    pootle flump
    ur codings are working excelent.

  13. #13
    Join Date
    Mar 2005
    Posts
    261
    Quote Originally Posted by pootle flump
    Ah - it is my detection equipment. Just noticed I was quoted as The Flumpster - no one could precede anything but irony with that. Oops
    I'm not quite sure how that happened...

    Anyway, I keep meaning to ask you...
    How's the flumpcycle? Oh and that bobble hat? (Bet you need it this time of year...)

  14. #14
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    This has been most entertaining guys ... And the thing is I don't even know what kind of Access file it will be (MDE or MDB) ... Since the pkg comes with the XP runtime I assume that it'll be the MDE (to protect their intellectual property) ... So, I guess the answer is MAYBE (depending on the db format at creation) ...

    The joys of my job ...

    - Mike
    Back to Access ... ADO is not the way to go for speed ...

  15. #15
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Quote Originally Posted by waynephillips
    How's the flumpcycle? Oh and that bobble hat? (Bet you need it this time of year...)
    Excelent thankyou though my true passion is the Flumpet - my grandpa taught me.
    Testimonial:
    pootle flump
    ur codings are working excelent.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •