While fetching data from a union query as shown in the code fragment
below I get the following error when fetching the data from the second
part which is only one row. The same behaviour is found when using a
similar query also limited to one row:
Untreated Exception at 0x102163d4 (msvcr71d.dll) in analysis.exe:
0xC0000005: AccessError-Writeposition 0x20333535.
The data access crashes when I either want to assign a row to the SSQL
struct dbEvent or when accessing to the data with row["name"] .
Is there another option to access the data?
Etienne
//set up query
sprintf(queryString, "(Select * from event where Measurements_ID =
'%.4d-%.2d-%.2d %.2d:%.2d:%.2d' and Event_DataFilePos >= %d and
Event_DataFilePos <= %d order by Event_DataFilePos)",
m_startYear, m_startMonth, m_startDay, m_startHour,
m_startMinute, m_startSecond, dataFileFirstPosition, dataFileLastPosition);
sprintf(queryString,"%s UNION DISTINCT (Select * from event
where Measurements_ID = '%.4d-%.2d-%.2d %.2d:%.2d:%.2d' and
Event_DataFilePos >= %d and Event_Type = 'p' order by Event_DataFilePos
ASC LIMIT 1)",
queryString, m_startYear, m_startMonth, m_startDay,
m_startHour, m_startMinute, m_startSecond, dataFileLastPosition,
dataFileLastPosition);
resUse = query.use(queryString);
//Access data from query
while (row = resUse.fetch_row())
{
dbEvent = row;
//event[counter].dataFilePosition = row["Event_DataFilePos"];
--
++++++++++++++++++++++++++++++++++++++++++++++
Dr. Etienne Hirt Art of Technology
Director R&D www.art-of-technology.ch
Technoparkstrasse 1 Ph: +41-43-311 77 02
8005 Zurich Sw: +41-43-311 77 00
Switzerland
==============================================