[SOLVED] SC8 and application hangs when clicking advanced search

I have a grid with joins:


SELECT 
    p.dohmpersnr,
    p.naam,
    p.voorvoegsel,
    p.voorletters,
    p.roepnaam,
    p.meisjesnaam,
    p.mnvoorvoegsel,
    p.titel,
    p.geslacht,
    p.geboortedatum,
    p.adres,
    p.huisnr,
    p.postcode,
    p.woonplaats,
    p.telefoon,
    p.mobiel,
    p.email,
    p.partnernaam,
    p.partnervoorvoegsels,
    p.partnervoorletters,
    p.partnertelefoon,
    p.partnermobiel,
    p.actief,
    b.dohmpersnr,
    b.extpersnr,
    b.herkomst,
    a.orgcode,
    o.naamorg,
    x.naam
FROM 
    persoon p,
    medewerker b,   
    aanstelling a,
    organogram o,
    bedrijf x
WHERE
    p.dohmpersnr=b.dohmpersnr and
    b.herkomst='[glob_herkomst]' and
    b.herkomst=x.herkomst and
    b.herkomst=a.herkomst and
    p.dohmpersnr=a.dohmpersnr and
    a.herkomst=o.herkomst and
    a.orgcode=o.orgcode
    

The select works without problems. But when I click on advanced search then the application freezes as well as scriptcase freezes. I have to quit the browser and restart SC . One time I had to restart apache to get it responsive again.

Hello,

Have you tried to active debug mode to see the SQL output?

Perhaps a palliative fix is to create a View with your current SQL statement.

I will also discuss this issue with our bugs team.

regards,
Bernhard

[QUOTE=bartho;27020]Hello,

Have you tried to active debug mode to see the SQL output?

Perhaps a palliative fix is to create a View with your current SQL statement.

I will also discuss this issue with our bugs team.

regards,
Bernhard[/QUOTE]

I will try to simplify the joins. I did not set the debug option as the application freezes it doesn’t make sence to me. No output whatsoever :wink:

Try generating your grid and look into Source to see the SQL generated.

I already solved it by another sql statement.

I suspect x.naam and p.naam to cause a problem… Interesting to try it out tho…

Try set an alias to each field of select.

Hi guys, tnx for the hints, but I already solved the issue by changing the sql.

Hello,

Thank you for update, Albert.

Solved.