Asked By Scott
06-Jul-07 03:32 PM

Our Windows Mobile 5 application bombs when SQL Server Mobile Edition
3.00.5206.00 throws a message:
ExceptionCode: 0xc0000005
ExceptionAddress: 0x0125aa68
Reading: 0x005ef000
The query (below) is generated dynamically (may be one or more filter
clauses, hence 'WHERE 1=1' is always generated and the AND clauses are
appendeded as appropriate.
Really odd: When I run this in Query Analyzer on the device, it also blows
up when run as-is. However, if I comment out any of the AND clauses, then
run (I get a result set) then uncomment the clause and now run the original
query, it works! If I disconnect and reconnect and run the full query again,
boom.
SELECT DISTINCT s.supplier_id, s.supplier_name, s.phone, s.fax, s.email,
s.contact_name, s.address1, s.notes
FROM insp_defect d
INNER JOIN supplier s ON d.assigned_supplier_id = s.supplier_id
INNER JOIN job j ON d.job_id = j.job_id
INNER JOIN job_user ju on j.job_id = ju.job_id
LEFT OUTER JOIN job_task jt ON d.task_id = jt.task_id
WHERE 1=1
AND ju.user_id = 176
AND j.subdivision_id =19
AND j.status = 'A'
AND jt.task_status in ('B', 'D')
Any help would be greatly appreciated (hate to use my support incidents so
quickly).
Scott