U++ framework
Do not panic. Ask here before giving up.

Home » Community » U++ community news and announcements » SqlMassInsert - remove option
SqlMassInsert - remove option [message #35185] Fri, 20 January 2012 11:45
mirek is currently offline  mirek
Messages: 14290
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!";
}


Previous Topic: U++ library prebuilt for vs2008
Next Topic: FindFile::GetPath
Goto Forum:
  


Current Time: Sun Apr 26 18:49:05 GMT+2 2026

Total time taken to generate the page: 0.00585 seconds