Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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: 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!";
}


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


Current Time: Mon Apr 29 00:44:12 CEST 2024

Total time taken to generate the page: 0.04591 seconds