New Access Table
I have already presented a function to create a new access table but I wasn’t very happy with it because we had to supply the full table creation SQL script.
I have altered that function so it creates an empty table. We can then use the Add-AccessColumn function to add columns. This also means I have a function to add columns to a table as and when I need them.
The function to create a table becomes
Our parameters become the connection and a table name. I don’t check that the table name exists – that will be a future refinement. We then issue a simple CREATE TABLE command.