Failing to import data to tables

juneau730

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

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
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?
 
Upvote 0
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.
 
Upvote 0
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.
 
Upvote 0
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...).
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,180
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top