Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
firebird-automations opened this issue May 11, 2015 · 3 comments

Comments

@firebird-automations
Copy link

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.

@firebird-automations
Copy link
Author

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.

@firebird-automations
Copy link
Author

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.

@firebird-automations
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants