Failing to import data to tables

juneau730

Board Regular
Joined
Jun 7, 2018
Messages
80
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.
 

Some videos you may like

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.

JonXL

Active Member
Joined
Feb 5, 2018
Messages
344
Office Version
365, 2016
Platform
Windows
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?
 

juneau730

Board Regular
Joined
Jun 7, 2018
Messages
80
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.
 

Micron

Well-known Member
Joined
Jun 3, 2015
Messages
1,853
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.
 

xenou

MrExcel MVP, Moderator
Joined
Mar 2, 2007
Messages
16,674
Office Version
2013
Platform
Windows
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...).
 

Watch MrExcel Video

Forum statistics

Threads
1,102,508
Messages
5,487,281
Members
407,590
Latest member
Grobler

This Week's Hot Topics

Top