Add Access record
We’ve seen how to create a database and a table. Now we need to know how to add a record to that table.
This takes a SQL INSERT statement and executes it against the table in our open database.
PS> Import-Module accessfunctions
PS> $db = Open-AccessDatabase -name test03.mdb -path c:\test
PS> $sql = @"
>> INSERT INTO test1
>> (FirstName, Lastname, DOB)
>> VALUES ("Fred", "Smith", "01/09/1979")
PS> Add-AccessRecord -sql $sql -connection $db
PS> Close-AccessDatabase $db
if you think this is identical to the function we used to create a table you are right. We are also unlikely to want to add a single record at a time to the table. next job is how we can add bulk data to the table.