Create table from a loop of file in dir

User avatar
sal21
PlatinumLounger
Posts: 3991
Joined: 26 Apr 2010, 17:36

Create table from a loop of file in dir

Post by sal21 »

I already have an active connection with ADO which is called CON.

My database (Access) contains a table, TEMPLATE with fields already encoded and all without data.

Now I loop some files in a dir and pull out during the loop for each file its name which I call FILENAME.

How can I with a function, create nn tables with only structure and rename them with FILENAME?

User avatar
HansV
Administrator
Posts: 74177
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Create table from a loop of file in dir

Post by HansV »

Why do you want to create a table for each file? It would be better to use a single table with an extra FileName field. That is much more efficient than separate tables.
Regards,
Hans

User avatar
sal21
PlatinumLounger
Posts: 3991
Joined: 26 Apr 2010, 17:36

Re: Create table from a loop of file in dir

Post by sal21 »

HansV wrote:
30 Nov 2021, 19:54
Why do you want to create a table for each file? It would be better to use a single table with an extra FileName field. That is much more efficient than separate tables.
Bro...
But really my prob Is tath....
Based The last post about to import value from JSON file to the and of import i have approx 13.000.xxx of Row.!!!!
Idea....
Split the big file in a Little piece and save record i a separate table.
If you have another idea....