Locking problem
Posted in 2000
I am developing a VB application which accesses Informix database and I have
the following SQL statement
SELECT informix.MasterTable.Field1, Count(informix.DetailTable.Field2) AS
CountOfdoc_code, Sum(informix.DetailTable.Field2) AS SumOfenter_qty
FROM informix.MasterTable JOIN informix.DetailTable ONinformix.MasterTable.Field1 = informix.DetailTable.Field1
GROUP BY informix.MasterTable.Field1
Having informix.MasterTable.Field2 = '13'
ORDER BY informix.MasterTable.Field1
Once in a while I get an ODBC error
[Informix][Odbc Informix Driver][Informix]Could not position within a table
(informix.MasterTable).
It only happens when someone is updating records from a application, but I
can get the same records in Crystal Reports, but Crystal Reports retrieves
the records and does the sum and count by it self - Crystal Reports does not
use SQL statement to get the sum or the count.
How can I change the SQL statement so I can get the records from
MasterTable and sum and count of records from DetailTable without (what it
appears to be) locking the records.
Thanks
Peter
pczurak@bigfoot.com