Exemple #1
0
CRow CResult::operator[](int i){
	if( i >= PQntuples(m_cResult) ){
		PQclear(m_cResult);
		throw CExceptionConnection("Nao existe essa linha!");
	}
	else{
		CRow row(i);
		for( int n = 0; n < PQnfields(m_cResult); n++ ){
			row.add( PQfname(m_cResult, n), PQgetvalue(m_cResult, i, n) );
		}
		return row;
	}
	return CRow(0);
}
CRow CSheet::getRow(int i)  
{  
	return CRow(m_rows.GetAt(i));  
}