Results 1 to 5 of 5

Thread: Failing to import data to tables
Thanks Thanks: 0 Likes Likes: 0

  1. #1
    Board Regular
    Join Date
    Jun 2018
    Posts
    62
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Failing to import data to tables

    Hello all,

    Recently I have noticed that my dBase has not been importing all data from the excel sheets into the dBase tables. After examining the dBase, the tables and the raw data sheets, I see no reason why it shouldn't be importing.

    I was hoping someone here might have an idea why, though the data is available, all appears to be correct, I am getting no errors, debug, etc. that it wouldn't import.

  2. #2
    Board Regular JonXL's Avatar
    Join Date
    Feb 2018
    Posts
    214
    Post Thanks / Like
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Failing to import data to tables

    Do you get any import errors?

    Is there anything at all consistent about the data not importing (always the same type, field, row number, etc.)? Is the DB getting up there is in size?

    Also, how are you importing the data? Your mention of debugging leads me to think it's not through the interface's import menu but by code. Can you post the code?

  3. #3
    Board Regular
    Join Date
    Jun 2018
    Posts
    62
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Failing to import data to tables

    Hello, sorry for the delay in replying to you, been crazy.

    I do not get any import errors of any type, just empty tables.

    You are correct, this is not being done directly thru an import function within the dBase. We have various vbscripts that run different routines to pull our data sets. The vbs create the csv files, format them as needed, convert to xlsx, etc.

    Yes the dBase size does grow, but I can also clear the tables as needed, which doesn't correct this issue.

    The consistency is that the same 2 sometimes 3 tables are blank even though the xlsx has data in it. Normally I can run the vbs a few times and it will eventually import all the data, or I can manually import it, via Import from Excel.

  4. #4
    Board Regular
    Join Date
    Jun 2015
    Location
    Ontario, Canada
    Posts
    1,701
    Post Thanks / Like
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Failing to import data to tables

    to troubleshoot this yourself you need to verify that every sql statement you have in code is valid in its entirety. Thus if there are variables or references that provide criteria (or anything else) you ought to step through and debug.print the sql after the references have been resolved. If all looks good, copy & paste to a new query to test. If it's an action query, I'd switch to datasheet view rather than run it. That way, it will indicate the records that will be updated without actually making any changes. If you have turned warnings off in code you are liking missing the message that would indicate there is an issue. If you are using Execute method of CurrentDb object without dbFailOnError parameter, you will also suppress warnings. Lastly, if there are IF blocks or Select Case blocks, ensure that the conditions they test are always as expected.

    Your big problem in all of this is that if the issue is random, it will likely take several executions of your code before anything is revealed.
    Tips for posting problems:
    1) "doesn't work" doesn't help. Post error message text/numbers and/or state what's happening.
    2) if posting code or sql, use code tags; specify on which code line errors occur, if applicable
    3) try to be specific; assume we know nothing about your issue - because we don't!

    Make all suggested changes in copies of your database or to its objects.

    "1 out of 1010 people understand binary. The other 1001 don't."

  5. #5
    MrExcel MVP
    Moderator
    xenou's Avatar
    Join Date
    Mar 2007
    Location
    Clev. OH, USA
    Posts
    16,474
    Post Thanks / Like
    Mentioned
    11 Post(s)
    Tagged
    1 Thread(s)

    Default Re: Failing to import data to tables

    Yes the dBase size does grow, but I can also clear the tables as needed, which doesn't correct this issue.
    Note that for access it is not enough to "clear tables". You must periodically do a "compact and repair" to free database space (periodically meaning as often as needed - once an hour, once a day, once a week, or once a year...).

    Using: Office 2010/Win7 (work) Office 2010/Win7 (home)

    You are rich in proportion to the number of things you can let alone.
    -- Henry David Thoreau

Some videos you may like

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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