A basic INSERT statement is like this:
INSERT INTO myTableName(column1, column2, column3...) VALUES('Data1', 2, 'Data3'...)
So if you have dynamically created your table you'll need to use the schema of that table to create the insert statement. Loop through the column names and create a comma separated list of them using a StringBuilder. Then loop through the data you want to add, making sure to format it properly based on it's DataType.
- Update for comment -
If you are using an array list you can loop through it with a for each statement. Here
] is an example. And as I suggested above, you may want to look at using a StringBuilder object to concat or append the names of your columns. Here
] is some information on that.