NetTalk Central

Author Topic: PROP:SQL / PROP:SQLFilter  (Read 4098 times)

johncort

  • Newbie
  • *
  • Posts: 6
    • View Profile
    • Email
PROP:SQL / PROP:SQLFilter
« on: October 19, 2007, 05:19:38 PM »
I see places to put in filters, but can I use a PROP:SQLFilter or PROP:SQL statement instead? The current filters are acting like locators ... they place the user iin the browse closest to the record matching their search criteria but don't filter out records that don't meet the criteria. I need to be able to limit the result set to only that which is pertinent to the search criteria. Or am I just doing something wrong?

Thanks!


ccordes

  • Sr. Member
  • ****
  • Posts: 384
    • View Profile
    • Email
Re: PROP:SQL / PROP:SQLFilter
« Reply #1 on: October 20, 2007, 08:09:45 AM »
Hi
I think you may be doing something wrong. The filters do actually work if you code them as a string like this -
'FIL:SomeDataField='''&p_web.gsv('SomeLImitingCrieria')&' AND FIL:SomeotherField <> 0'
The advantage is being able to use your Clarion defined variable names in the filter string.
With Prop:filter you get to do that too, but with Prop:SQL and (I believe) prop:sqlfilter, you need to use the external names of things.

That being said, I use prop:sql all the time too because it gives much better control over the select statement being passed to the backend. (No  forced Order By clause)
I created a simple template to make a GetExternal function so I can code the sql like 'where '&getext('FIL:SomeField')& '= '''&p_web.gsv('SomeLimiter')

HTH
Chris c
Real programmers use copy con newapp.exe