/**
Dump the content of a dbms database in a html file

*/
void CDbDbmsDumper::OutputDBContentsL()    
	{
	// Output Title
	_LIT8(KHdr,"<H2>Contacts Model DB Dump:</H2>");
	iFile.Write(KHdr);
	
	// Preferences Table Name that will appear first in the output file
	_LIT(KPrefTableName,"PREFERENCES");
	
	TInt counter = 0;
	const TInt KNumTables( (iTableNames->Count() )); 
	TBool outputPrefTable( (EFalse) );
	
	// if a Table named Preferences Exists in the DB output it first
	while (!outputPrefTable && counter < KNumTables)
		{
	    if ((*iTableNames)[counter++].Compare(KPrefTableName) == 0)
			{
			OutputTableToFileL(--counter);
			outputPrefTable = ETrue;
	   		}
	    }
	
	// for each table - output all tables except the Preferences Table	
	for (counter = 0; counter < KNumTables; ++counter)
		{
		if ((*iTableNames)[counter].Compare(KPrefTableName) != 0)
			{
			OutputTableToFileL(counter);
			}
		}			
	}
示例#2
0
/**
Output database content to a file

*/
void CDbSqlDumper::OutputDBContentsL()    
	{
	// Output Title
	_LIT8(KHdr,"<H2>Contacts Model DB Dump:</H2>");
	iFile.Write(KHdr);
		
	TInt counter = 0;
	const TInt KNumTables( iTableNames.Count() ); 
	
	// for each table - output all tables 
	for (counter = 0; counter < KNumTables; ++counter)
		{
		OutputTableToFileL(counter);
		}			
	}