Home » Community » U++ community news and announcements » SqlMassInsert - remove option
SqlMassInsert - remove option [message #35185] |
Fri, 20 January 2012 11:45 |
|
mirek
Messages: 13975 Registered: November 2005
|
Ultimate Member |
|
|
SqlMassInsert now got a SqlBool to EndRow, useful in scenario when the operation is "replace" - replacing many rows in database.
SqlMassInsert then combines all these SqlBools and issues a single 'delete from TABLE' before inserting new rows (by combined insert .. select union commands). All commands for group flush are combined into transaction and there is also a new IsError flag.
Example:
SqlMassInsert ins;
...
for(...) {
ins
(DAY, day)
(KEYWORD, keyword)
(SERVICE, service)
.EndRow(DAY == day && KEYWORD == keyword && SERVICE == service);
if(ins.IsError())
throw "SQL error!";
}
|
|
|
Goto Forum:
Current Time: Mon Apr 29 00:44:12 CEST 2024
Total time taken to generate the page: 0.04591 seconds
|