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 » Newbie corner » Table is empty ?!
Table is empty ?! [message #41032] Tue, 22 October 2013 18:18 Go to previous message
idkfa46 is currently offline  idkfa46
Messages: 155
Registered: December 2011
Experienced Member
hi all,
I have to check if my database tables are empty...
I wrote this control function:
bool Impostazioni::ControlloDatabase()
{
	int a,b;

	SQL * Select(ID_TIPOLEGNO).From(TIPOLOGIALEGNO);
	while(SQL.Fetch())
		a =	SQL[ID_TIPOLEGNO].GetCount();
		
	SQL * Select(ID_LEGNO).From(CLASSIRESISTENZALEGNO);
	while(SQL.Fetch())
		b =	SQL[ID_LEGNO].GetCount();
	
	if(a>0 || b>0)
		return true;
	else
		return false;	
}


it works but... I don't like it, someone can explain me a better solution ?

regards,
Matteo
 
Read Message
Read Message
Read Message
Previous Topic: Confused about ArrayCtrl
Next Topic: Reporto to rtf or doc format
Goto Forum:
  


Current Time: Fri May 10 10:50:25 CEST 2024

Total time taken to generate the page: 0.02715 seconds