Subject Re: applylocate not working
From Akshat Kapoor <akshat.kapoor@kapoorsons.in>
Date Sat, 8 Jun 2024 14:59:25 +0530
Newsgroups dbase.getting-started

Good Afternoon Charlie,

> I thought this would be easy since I have done this before but the apply locate is never found.  tgrade is what i am trying to find.  actually it represents a field in the table.  so that isn't the problem (yet) because this never finds tid and cat which are also strings.
>
> i have tried this looking for bith variables and only one which certainly should have been found, but for some reason the applylocate doesn't work.
>
> Can anyone help?
>

if form.invedatamodule1.inve.rowset.applylocate("full ='"+mlastitem+"'")

The above line is working perfectly for me and is executed more times
than I can count.

I have also faced issues with applylocate() in the past. And it is damn
difficult to debug it in the form.

>
>
>   function COMBOBOX4_onChange()
>            co = form.coins1.rowset
>            tgrade = trim(form.combobox4.value)
>                 tid = trim(form.entryfield5.value)
>                 tcat= trim(form.combobox2.value)
>                 //co.applylocate("year= '" + tid + "'")// and category= '" + tcat + "'")
>                 co.applylocate( "year= '" + 'tid' + "' and category= '" + tcat + "'")
>                 form.entryfield1.value = val(co.fields["&tgrade."].value)
>                 //if found()
>                    msgbox( ""+found() )

I would suggest that you execute the following commands after filling in
the blanks from the command window.

q = new query()
q.sql = ""
q.active = true
?q.rowset.applylocate("year= '" + tid + "'")
if the above line returns false then try the following

?q.rowset.count()
?q.rowset.applylocate("year= '2024'")

Also check for datatype mismatch.

Regards
Akshat


Warning: Unknown: write failed: No space left on device (28) in Unknown on line 0

Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct () in Unknown on line 0