I use Prepared Statements when adding a single new record to my PostgreSQL database using the INSERT INTO TableName (field1, field2,
) VALUES (
) command, but this command allows multiple records to be entered i.e.
INSERT INTO TableName (field1, field2,
) VALUES (
), (
), (
), (
), (
), (
);
Is it possible to use this multi-record insertion as a prepared statement?
What you can consider David is executing multiple prepared statements in one transaction.
Sometimes the easiest way to find out is to try something.
I just got this the work in the SQLite Example project.
[code]Dim ps As SQLitePreparedStatement
ps = app.db.Prepare(“INSERT INTO Team(Name,Coach,City) VALUES(?,?,?),(?,?,?),(?,?,?)”)
for i as integer = 0 to 8
ps.BindType(i,3)
Next
ps.SQLExecute(“Seagulls”, “Mike”, “Albany”,“Pigeons”, “Mark”, “Springfield”,“Crows”, “Matt”, “Houston” )[/code]