Welcome to MapForums!

Register, sign in, or use Facebook Connect above to join in and participate in the forum.

When you are signed in, this message, the ads in this row, and the red-underlined link ads all go away.

Subscribe to receive our newsletter.
Subscribe Unsubscribe
Page 1 of 2 12 LastLast
Results 1 to 10 of 12

VB Run-Time Error 4030 After Upgrading to Office 2007

This is a discussion on VB Run-Time Error 4030 After Upgrading to Office 2007 within the Development forums, part of the MapPoint Desktop Discussion category; We recently ‘upgraded’ from Office 2003 to Office 2007 and are now encountering the following message when trying to connect ...

  1. #1
    ChewCM is offline Junior Member White Belt
    Join Date
    Mar 2009
    Posts
    4

    VB Run-Time Error 4030 After Upgrading to Office 2007


    We recently ‘upgraded’ from Office 2003 to Office 2007 and are now encountering the following message when trying to connect from Access 2007 to MapPoint 2002:
    Run-time error ‘4030’:
    Cannot import data because a connection to the database could not be established.
    The below VB script excerpt ran fine under Office 2003. The line in red indicates where the error occurs.
    'Main Loop
    For k = 1 To number_of_tables
    ' Create excel object. This is where the results of this mapPoint process will be put.
    ' There will be 2*k of these datasets
    Set objexcel_unassigned = Excel.Application
    objexcel_unassigned.Workbooks.Add
    ipos = 0
    name = array2(k)
    result = SysCmd(acSysCmdInitMeter, "Read table " & k & " of " & number_of_tables, 1)

    With objApp.ActiveMap.DataSets
    mdb = dbcurrent.name & "!"
    szconn = J6_Create_MapPoint_IR.mdb & name
    Set oDS = .ImportData(szconn, , geoCountryUnitedStates, , geoImportAccessTable)
    Set objRS = oDS.QueryAllRecords
    result = SysCmd(acSysCmdRemoveMeter)
    result = SysCmd(acSysCmdInitMeter, "Update excel " & k & " of " & number_of_tables, 1)
    Call update_excel
    End With
    szconn contains what appears to be a valid pointer: "S:\GEO_CODING\Databases\Version_4.1.mdb!0"

    Our VB developer retired and any assistance that anyone can provide would be greatly appreciated.

    Thank you for looking.

  2. #2
    Mattys Consulting's Avatar
    Mattys Consulting is offline Senior Member Black Belt
    Join Date
    Dec 2002
    Posts
    1,040

    Re: VB Run-Time Error 4030 After Upgrading to Office 2007

    Hi ChewCM,

    The guy who retired was also an Access developer, I see.
    I'm available.

    You'll need to use either ADO or a UDL file.

    Mike Mattys
    Mattys Consulting - Custom Programming

  3. #3
    Eric Frost's Avatar
    Eric Frost is offline Administrator Black Belt
    Join Date
    Jul 1992
    Posts
    5,094
    Blog Entries
    4

    Cannot import data because a connection to the database could not be established.

    Cannot import data because a connection to the database could not be established.
    I get this error when there is locking.. is the database open by anything else? See if there is an .ldb file in the directory where the database is right before that line is executed.

    Eric
    ~ Order MapPoint MapPoint 2013 Here and Get Free Access to the MapForums Downloads ~
    ~~
    ~ Upgrade to Get Access to the MapForums Downloads ~

  4. #4
    Eric Frost's Avatar
    Eric Frost is offline Administrator Black Belt
    Join Date
    Jul 1992
    Posts
    5,094
    Blog Entries
    4

    Re: VB Run-Time Error 4030 After Upgrading to Office 2007

    The below VB script excerpt ran fine under Office 2003.
    You say it's a VB script, what is it running in? An Access VBA module or something else? If it is in an Access VBA module in the same database, trying moving it to a different database.

    Eric
    ~ Order MapPoint MapPoint 2013 Here and Get Free Access to the MapForums Downloads ~
    ~~
    ~ Upgrade to Get Access to the MapForums Downloads ~

  5. #5
    Winwaed's Avatar
    Winwaed is offline Mapping-Tools.com Black Belt
    Join Date
    Feb 2004
    Location
    Irving,Texas
    Posts
    1,859
    Blog Entries
    60

    Re: VB Run-Time Error 4030 After Upgrading to Office 2007

    Access 2007 has a different database engine ("ACE") than Access 2003 and earlier ("JET").

    Considering ACE probably wasn't even on the drawing board in 2002 let alone written, it should be of no surprise that MapPoint 2002 cannot read it. Have you tried MapPoint 2009?


    Richard
    Winwaed Software Technology LLC
    http://www.winwaed.com
    See http://www.mapping-tools.com for MapPoint Tools

  6. #6
    Eric Frost's Avatar
    Eric Frost is offline Administrator Black Belt
    Join Date
    Jul 1992
    Posts
    5,094
    Blog Entries
    4

    Re: VB Run-Time Error 4030 After Upgrading to Office 2007

    Access 2007 can work with MDB file formats from previous versions, right?

    The new Access 2007 file format extension is accdb. I would assume MapPoint 2002 could still open MDB files if they are Access 2000/2002 format?

    Eric
    ~ Order MapPoint MapPoint 2013 Here and Get Free Access to the MapForums Downloads ~
    ~~
    ~ Upgrade to Get Access to the MapForums Downloads ~

  7. #7
    ChewCM is offline Junior Member White Belt
    Join Date
    Mar 2009
    Posts
    4

    Re: VB Run-Time Error 4030 After Upgrading to Office 2007

    Quote Originally Posted by Eric Frost View Post
    You say it's a VB script, what is it running in? An Access VBA module or something else? If it is in an Access VBA module in the same database, trying moving it to a different database.

    Eric
    The developer created a form within MS Access with a button that calls this module. The form is contained within the same DB that the line of code in question refers to. Does that answer your question?

    Quote Originally Posted by Winwaed View Post
    Access 2007 has a different database engine ("ACE") than Access 2003 and earlier ("JET").

    Considering ACE probably wasn't even on the drawing board in 2002 let alone written, it should be of no surprise that MapPoint 2002 cannot read it. Have you tried MapPoint 2009?


    Richard
    No, we have not tried MP 2009, I can put in a request to see if we can install the trial version. I think this will be our next step.

    Thank you all!

  8. #8
    Eric Frost's Avatar
    Eric Frost is offline Administrator Black Belt
    Join Date
    Jul 1992
    Posts
    5,094
    Blog Entries
    4

    Re: VB Run-Time Error 4030 After Upgrading to Office 2007

    Quote Originally Posted by ChewCM View Post
    The developer created a form within MS Access with a button that calls this module. The form is contained within the same DB that the line of code in question refers to.
    Try running it separate - run it from a different database or move the table or query you want to import to a separate database.

    Eric
    ~ Order MapPoint MapPoint 2013 Here and Get Free Access to the MapForums Downloads ~
    ~~
    ~ Upgrade to Get Access to the MapForums Downloads ~

  9. #9
    ChewCM is offline Junior Member White Belt
    Join Date
    Mar 2009
    Posts
    4

    Re: VB Run-Time Error 4030 After Upgrading to Office 2007

    Quote Originally Posted by Eric Frost View Post
    Try running it separate - run it from a different database or move the table or query you want to import to a separate database.

    Eric
    Interesting idea, but if this is a simple internal deadlock situation, why would the same script work under Office 2003?

    I'll try your suggestion today though.

  10. #10
    Eric Frost's Avatar
    Eric Frost is offline Administrator Black Belt
    Join Date
    Jul 1992
    Posts
    5,094
    Blog Entries
    4

    Re: VB Run-Time Error 4030 After Upgrading to Office 2007

    There are settings that have to do with locking. I'm no expert on them. But maybe they were set differently in Access 2003 or the defaults are different in Access 2007.

    Eric
    ~ Order MapPoint MapPoint 2013 Here and Get Free Access to the MapForums Downloads ~
    ~~
    ~ Upgrade to Get Access to the MapForums Downloads ~

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Office Communication Server 2007 R2 Is Here!
    By MSDN MapPoint Feed in forum Bing Maps Blogs & Tweets
    Replies: 0
    Last Post: 02-06-2009, 10:01 PM
  2. Virtual Earth as SmartClient in Office 2007
    By Johannes Kebeck's Blog in forum Bing Maps Blogs & Tweets
    Replies: 0
    Last Post: 03-01-2008, 03:13 PM
  3. Run-time error 2147467259 80004005 automation error
    By ThomasB in forum MapPoint Desktop Discussion
    Replies: 2
    Last Post: 02-27-2007, 12:41 PM
  4. Microsoft Office 2007 Customization is Supported by Add-in Express
    By Eric Frost in forum News and Announcements
    Replies: 0
    Last Post: 01-31-2007, 08:52 AM
  5. MapPoint 2004 Office Add-In error
    By StephenBurd in forum MapPoint Desktop Discussion
    Replies: 2
    Last Post: 06-10-2004, 10:41 PM

Tags for this Thread

Posting Permissions

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


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127