"select Users.*, (select Comp_Id from User_Emp where Id=u.Id) as C_Id, 1 as
Emp_Ex,
(select Count(*) from tblRg_Cards where Id=u.Id) as Is_Card
from Users u
where exists (select * from User_Emp where Id=u.Id) and
exists (select * from User_Edu where Id=u.Id)
union
select Users.*, -1 as C_Id, 0 as Emp_Ex,
(select Count(*) from tblRg_Cards where Id=u1.Id) as Is_Card
from Users u1
where (not exists (select * from User_Emp where Id=u1.Id)) or
(not exists (select * from User_Edu where Id=u1.Id))
order by 2"
For updating this query I use TUpdateSql component.
For saving the data to database I call the method:
TQuery.ApplyUpdates or TDatabase.ApplyUpdates([MyQuery]).
Once in 15-20 times when I try to save data I get the exception with
message:
"Invalid BLOB handle in record buffer".
I have no any blob field in my table...
How can I solve this problem ?
Thanks,
Granat Yevgeny
it's a guess, but I has a simailar error yesterday. It might be the size of
the field that your trying to return. try setting blob size and blobs to
cache for your BDE alias to 512 and see if the problem goes away.
regards
Chris Barrington
"Chris Barrington" <cbaringt...@channel4.co.uk> wrote in message
news:3ab72e8e_1@dnews...