VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

Access ADO Bulk Table Copy (updated)

Ted Calbazana  (2 Submissions)   Databases/Data Access/DAO/ADO   Visual Basic 3.0   Intermediate   Wed 3rd February 2021

A valuable tool in your programming toolkit. Use this routine for when an Access table goes bad. Often when this happens conventional INSERT or APPEND queries or cut/paste techniques don't work for backing up your table. This is a routine for copying data from one table to another table, field by field. As the information is processed, bad data fields are skipped over and logged in a log file. Only good data is deposited in the target table. **re-uploaded/Corrected II**

Inputs
In the Access debug window type the function name and in parenthesis type your source table name and the target table name and .... away you go!

Assumes
Make sure you have set a reference to the Microsoft DAO 2.5 or 2.6 Library Make sure all the "Allow Zero Lengths" table properties in all fields have been set to YES. (This will now be done automatically with the recently added "SetZeroLength" routine.) Make sure the "REQUIRED" property is set to NO. Create a little log table. And call it "tbl_UpdateLog" with the following fields: Name Type Size ID Number (Long) 4 BadID Number (Long) 4 Comment Text 50

Returns
Feelings of relief. Many high fives. A good nights sleep...

Rate Access ADO Bulk Table Copy (updated) (5(5 Vote))
Access ADO Bulk Table Copy (updated).bas

Access ADO Bulk Table Copy (updated) Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters