Results 1 to 7 of 7
  1. #1
    Join Date
    Jan 2006
    Posts
    10

    Red face Unanswered: getObject opens new version of Access DB

    Hi,

    We recently upgraded our work SOE to XP and with it came an MS Access update from 2000 to 2003.

    now when Lotus Notes Automation runs a getObject command, it opens a new version of the Access database regardless of whether one was already open.

    is there a better way or alternate to getObject or is there a setting in Access that will prevent this from happening?

    Can anyone assist?

    coded in Notes as follows:
    Set AccessApp = getObject("\\Sau3dl106st\D_RelMgmt\KRv2\ProjectDat abase.mdb","Access.Application")

    Cheers,

    mark

  2. #2
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Hi Mark

    I would put in some error handling and remove the path to the file from the GetObject function. If there is an Access database open it should get that reference. If not it will error - trap this and execute the code you have posted.

    HTH
    Testimonial:
    pootle flump
    ur codings are working excelent.

  3. #3
    Join Date
    Jan 2006
    Posts
    10

    Smile Thanks

    Hi HTH,

    Thanks for that...I did remove the path will some success. I have no idea what to do in relation to error handling however...any advice?

    Cheers,

    Mark

  4. #4
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    HTH = Hope This Helps

    Well - it isn't real error handling but (air code):

    Code:
    On Error Resume Next
     
    Set AccessApp = getObject(,"Access.Application") 
     
    On Error Goto 0
     
    If Err.Number <> 0 Then
     
    Set AccessApp = getObject("\\Sau3dl106st\D_RelMgmt\KRv2\ProjectDat abase.mdb","Access.Application") 
    Err.Clear
     
    End If
    Testimonial:
    pootle flump
    ur codings are working excelent.

  5. #5
    Join Date
    Jan 2006
    Posts
    10

    Thanks Again...no luck with error handlig as yet..tried your code but with no success after adapting it to suit Lotus Script...

    No Err.Clear function in notes apparently, that'd be too easy!

    I'm trying to search for a simple error routine in Notes help but they don't seem to like simple answers.

    Cheers,

    Mark

  6. #6
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    Would the shell command be appropriate here?
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  7. #7
    Join Date
    Jan 2006
    Posts
    10

    Problem Solved

    Thanks to all for your assistance....Mark

    Once I got the error handling right for Lotus Script it worked a treat.

    Coded as follows=>

    On Error Goto errorHandler
    Set AccessApp = getObject(,"Access.Application")
    On Error Goto 0

    code code code...
    Exit Sub

    errorHandler:

    Set AccessApp = getObject("\\Sa3knx04fs\D_Resysspt\CTD\ProjectData base.mdb","Access.Application")
    Resume Next
    End Sub

Posting Permissions

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