Hi,
I have one situation that i cannot solve.
I have a struct like this:
struct ZonesTBL { int ID; int Terminal; String Description; int InitialValue; int FinalValue; int ItemPrice; String Employees; };
That will holds the information of a table row.
And a function:
OwnedArray<ZonesTBL> getAllZones() { ZonesTBL ZonesData; OwnedArray<ZonesTBL> ZonesArray; (...) int res = 0; while ((res = sqlite3_step(query)) == SQLITE_ROW) { Logger::outputDebugString("**DB Zones - Found one"); ZonesData.ID = (intptr_t)sqlite3_column_text(query, 0); ZonesData.Terminal = (intptr_t)sqlite3_column_text(query, 1); ZonesData.Description = (char*)sqlite3_column_text(query, 2); ZonesData.InitialValue = (intptr_t)sqlite3_column_text(query, 3); ZonesData.FinalValue = (intptr_t)sqlite3_column_text(query, 4); ZonesData.ItemPrice = (intptr_t)sqlite3_column_text(query, 5); ZonesData.Employees = (char*)sqlite3_column_text(query, 6); ZonesArray.add(&ZonesData); } (...) return ZonesArray; }
But I cannot add the struct ZonesData to my array. What is wrong and how to solve it ?
Thanks,
Paulo
as