Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.clipper.visual-objects > #6171 > unrolled thread

Bug in DBServer:SetFilter() - VO 2.8 SP4b

Started byRonny <ronnykr@gmail.com>
First post2013-10-30 05:33 -0700
Last post2013-11-04 05:13 -0800
Articles 9 — 5 participants

Back to article view | Back to comp.lang.clipper.visual-objects


Contents

  Bug in DBServer:SetFilter() - VO 2.8 SP4b Ronny <ronnykr@gmail.com> - 2013-10-30 05:33 -0700
    Re: Bug in DBServer:SetFilter() - VO 2.8 SP4b Norman <nopotter@web.de> - 2013-10-30 10:41 -0700
      Re: Bug in DBServer:SetFilter() - VO 2.8 SP4b Ronny <ronnykr@gmail.com> - 2013-10-30 11:48 -0700
        Re: Bug in DBServer:SetFilter() - VO 2.8 SP4b Norman <nopotter@web.de> - 2013-10-30 16:02 -0700
          Re: Bug in DBServer:SetFilter() - VO 2.8 SP4b Johan Nel <johan.nel@xsinet.co.za> - 2013-10-31 00:06 -0700
            Re: Bug in DBServer:SetFilter() - VO 2.8 SP4b "Ronny K. Rodrigues" <ronny@deltasge.com.br> - 2013-10-31 15:34 -0700
    Re: Bug in DBServer:SetFilter() - VO 2.8 SP4b Norman <nopotter@web.de> - 2013-11-04 00:47 -0800
    Re: Bug in DBServer:SetFilter() - VO 2.8 SP4b Karl Wochele <kw@e©os-system.dot.de> - 2013-11-04 10:22 +0100
      Re: Bug in DBServer:SetFilter() - VO 2.8 SP4b "Ronny K. Rodrigues" <ronny@deltasge.com.br> - 2013-11-04 05:13 -0800

#6171 — Bug in DBServer:SetFilter() - VO 2.8 SP4b

FromRonny <ronnykr@gmail.com>
Date2013-10-30 05:33 -0700
SubjectBug in DBServer:SetFilter() - VO 2.8 SP4b
Message-ID<f95ec189-7660-40eb-814d-b3923890ecff@googlegroups.com>
I am having problems using the SetFilter.
using eg SetFilter("! Deleted()"), have a return true but the filter is ignored and the entire table is covered in the next while.

Has anyone gone through this and could help me?

TIA

[toc] | [next] | [standalone]


#6172

FromNorman <nopotter@web.de>
Date2013-10-30 10:41 -0700
Message-ID<315bf448-f7b9-4c79-a58d-362e8e33c671@googlegroups.com>
In reply to#6171
Ronny,

"Covered". Do you mean nothing shows up, or all records can be seen ?

What if you tried:

set deleted off
// show records
set deleted on
// show eecords

Same result?

Did you put gotop() after setfilter()?

Norman



Am Mittwoch, 30. Oktober 2013 13:33:11 UTC+1 schrieb Ronny:
> I am having problems using the SetFilter.
> 
> using eg SetFilter("! Deleted()"), have a return true but the filter is ignored and the entire table is covered in the next while.
> 
> 
> 
> Has anyone gone through this and could help me?
> 
> 
> 
> TIA

[toc] | [prev] | [next] | [standalone]


#6174

FromRonny <ronnykr@gmail.com>
Date2013-10-30 11:48 -0700
Message-ID<d2e41760-f794-4d08-b988-44c90fb670b5@googlegroups.com>
In reply to#6172
I've tried it all.
The issue is that my main table must be show deleted records, and this other not, for it must use SetFilter("!Deleted() .and. Exported==.F.")

Looking sdk, apparently the problem is to convert this filter to codeblock where to convert it returns NIL, eg

cFiltro := "!Deleted() .and. exported == .F."
cbFiltro := &("{||" + cFiltro + "}")

// cbFiltro == NIL

But it worked perfectly with SP3.

[toc] | [prev] | [next] | [standalone]


#6176

FromNorman <nopotter@web.de>
Date2013-10-30 16:02 -0700
Message-ID<346001c3-8a93-4ab2-99c9-64a8955c6c17@googlegroups.com>
In reply to#6174
Should it not be 
"!Deleted() .and. _field->exported==false" ?

You can also put that expression in a local var in your calling method.

Or overwrite the sdk method (dbserver:setfilter) with your own copy
and examine it with debugger.



Am Mittwoch, 30. Oktober 2013 19:48:49 UTC+1 schrieb Ronny:
> I've tried it all.
> 
> The issue is that my main table must be show deleted records, and this other not, for it must use SetFilter("!Deleted() .and. Exported==.F.")
> 
> 
> 
> Looking sdk, apparently the problem is to convert this filter to codeblock where to convert it returns NIL, eg
> 
> 
> 
> cFiltro := "!Deleted() .and. exported == .F."
> 
> cbFiltro := &("{||" + cFiltro + "}")
> 
> 
> 
> // cbFiltro == NIL
> 
> 
> 
> But it worked perfectly with SP3.

[toc] | [prev] | [next] | [standalone]


#6178

FromJohan Nel <johan.nel@xsinet.co.za>
Date2013-10-31 00:06 -0700
Message-ID<77a632a8-d1a8-4998-bc65-a9f25fadfdaf@googlegroups.com>
In reply to#6176
Hi Norman,

I believe you hit the nail on the head
> "!Deleted() .and. _field->exported==false" ?

Ronny's method the system will look for a MEMVAR named exported.

Also why first create a string and then macro-compile?

cbFiltro := {|| !Deleted() .and. _field->exported==.f. }

If cbFiltro was done as:

cbFiltro := {|| !Deleted() .and. exported==.F. }

The compiler would have shown the real issue that exported is not a declared variable.

Regards,

Johan Nel
Vulcan VIP
Durban, South Africa.

[toc] | [prev] | [next] | [standalone]


#6184

From"Ronny K. Rodrigues" <ronny@deltasge.com.br>
Date2013-10-31 15:34 -0700
Message-ID<804957fd-def0-4818-83ea-36350387cced@googlegroups.com>
In reply to#6178
I already use SetFilter passing a string, because in many cases need to concatenate multiple expressions dynamically.

I've tried everything you imagine in SP4 and apparently the problem is in the function Deleted (), because in debug mode when trying to execute the following expression got an error message that is probably the cause of the problem:

oDBF:SetFilter( {|| !DELETED() .AND. ( _field->EXPORTADO == .F. .OR. recno()> 1044) } )

result:

Undefined external (DELETED) in expression!

The larger question is why this has stopped working in SP4?
I have many sitemas massively using this type of filter based string and my question is what else has stopped working?

Another bug I noticed is that if I forget to declare a variable the compiler does not accuse more in line what I am trying to use an undeclared variable and much less the name of the variable and that is also bothering me.

What will function occurred deleted?

someone dares?

[toc] | [prev] | [next] | [standalone]


#6198

FromNorman <nopotter@web.de>
Date2013-11-04 00:47 -0800
Message-ID<f841e674-7990-411b-9d29-9ba30ffc3b2d@googlegroups.com>
In reply to#6171
Ronny,
I can confirm the malfunction of deleted() in 2.6.
It has no effect on setfilter.

lOK := (m_oSvr:wWorkArea)->( VODBSetFilter( "{|| !deleted() }" ) )
does not help neither.

So far as we tried now deleted() is a risk.

Don't know if you prepare the tables for bbrowser? There is as method for this, too. bbrowser:setdeleted()

> Another bug I noticed is that if I forget to declare a variable the compiler does not accuse more in line what I am trying to use an undeclared variable and much less the name of the variable and that is also bothering me. 

What about setup->Compatibility->undeclared variables ?

> The larger question is why this has stopped working in SP4? 

Yes. New bug by vo programmers ? Can happen all the time.
I could see that 'set deleted on/off! is working, but unfortunately it is global. 

And of course it is not possible to pack() just before doing filter operations since there might be shared file openings.

If you cannot solve it for now, you might use a workaround.

Norman










Norman

[toc] | [prev] | [next] | [standalone]


#6199

FromKarl Wochele <kw@e©os-system.dot.de>
Date2013-11-04 10:22 +0100
Message-ID<bdp7akFlh6sU1@mid.individual.net>
In reply to#6171
Hi Ronny,

did you try to put

EXTERNAL Deleted

somewhere into your code ?

Probably the function is not linked into your application...

HTH
Karl

Am 30.10.2013 13:33, schrieb Ronny:
> I am having problems using the SetFilter.
> using eg SetFilter("! Deleted()"), have a return true but the filter is ignored and the entire table is covered in the next while.
>
> Has anyone gone through this and could help me?
>
> TIA
>

[toc] | [prev] | [next] | [standalone]


#6200

From"Ronny K. Rodrigues" <ronny@deltasge.com.br>
Date2013-11-04 05:13 -0800
Message-ID<e8fd468d-62df-476c-88bd-65627b2dd5c6@googlegroups.com>
In reply to#6199
Exactly Karl.

created a function using deleted () and bingo!

function bugDeleted() as logic
   return DELETED()

And now everything is back to normal.

There remains the question of why it worked before without this feature.


PS: The undeclared variables, the option is not checked there.


Thank you.

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.clipper.visual-objects


csiph-web