FirebirdSQL/firebird-odbc-driver

Bulk inserts on Prepared statements only inserts the first row [ODBC187]

firebird-automations opened this issue · 4 comments

Submitted by: Alan Marryat (amarryat)

Using SQLPrepare, binding columns, SQLParamOptions to insert multiple rows at once.

When the table is empty, attempting to insert 10 rows for example results in 1 new row, equal to the first bound row. The pirow parameter in SQLParamOptions remains at 0 or 1 or whatever you initialized it to.

The next time you do the bulk insert with 10 rows for example, all 10 rows will be inserted and the table will now contain 11 rows. pirow parameter is updated correctly.

Update: This seems very inconsistent. Sometimes it doesn't work at all. Attempting to store 10 rows results in only the first row, and pirow parameter isn't updated at all. Also, running an update again once there is an existing row often only updates that existing row, and pirow is left untouched again.

Modified by: Alan Marryat (amarryat)

description: Using SQLPrepare, binding columns, SQLParamOptions to insert multiple rows at once.

When the table is empty, attempting to insert 10 rows for example results in 1 new row, equal to the first bound row. The pirow parameter in SQLParamOptions remains at 0 or 1 or whatever you initialized it to.

The next time you do the bulk insert with 10 rows for example, all 10 rows will be inserted and the table will now contain 11 rows. pirow parameter is updated correctly.

=>

Using SQLPrepare, binding columns, SQLParamOptions to insert multiple rows at once.

When the table is empty, attempting to insert 10 rows for example results in 1 new row, equal to the first bound row. The pirow parameter in SQLParamOptions remains at 0 or 1 or whatever you initialized it to.

The next time you do the bulk insert with 10 rows for example, all 10 rows will be inserted and the table will now contain 11 rows. pirow parameter is updated correctly.

Update: This seems very inconsistent. Sometimes it doesn't work at all. Attempting to store 10 rows results in only the first row, and pirow parameter isn't updated at all.

Modified by: Alan Marryat (amarryat)

description: Using SQLPrepare, binding columns, SQLParamOptions to insert multiple rows at once.

When the table is empty, attempting to insert 10 rows for example results in 1 new row, equal to the first bound row. The pirow parameter in SQLParamOptions remains at 0 or 1 or whatever you initialized it to.

The next time you do the bulk insert with 10 rows for example, all 10 rows will be inserted and the table will now contain 11 rows. pirow parameter is updated correctly.

Update: This seems very inconsistent. Sometimes it doesn't work at all. Attempting to store 10 rows results in only the first row, and pirow parameter isn't updated at all.

=>

Using SQLPrepare, binding columns, SQLParamOptions to insert multiple rows at once.

When the table is empty, attempting to insert 10 rows for example results in 1 new row, equal to the first bound row. The pirow parameter in SQLParamOptions remains at 0 or 1 or whatever you initialized it to.

The next time you do the bulk insert with 10 rows for example, all 10 rows will be inserted and the table will now contain 11 rows. pirow parameter is updated correctly.

Update: This seems very inconsistent. Sometimes it doesn't work at all. Attempting to store 10 rows results in only the first row, and pirow parameter isn't updated at all. Also, running an update again once there is an existing row often only updates that existing row, and pirow is left untouched again.

Modified by: Alan Marryat (amarryat)

summary: Bulk inserts on Prepared statements only insert one row when the table is empty => Bulk inserts on Prepared statements only inserts the first row

Needs to be tested on 3.0 driver