If there is no index order selected and you use
oxBrw:bSeek := {|c| DbSeek( Upper( c ) ) }
xBrowse crashes.
Perhaps xBrowse could handle this.
I use
oxBrw:bSeek := {|c| iif( indexord() > 0,;
DbSeek( Upper( c ) ) ,( msginfo("keine Sortierung ausgewählt"), .f.) ) }
Best regards,
Otto
xBrowse - dbSeek
- Otto
- Posts: 6403
- Joined: Fri Oct 07, 2005 7:07 pm
- Has thanked: 24 times
- Been thanked: 2 times
- Contact:
xBrowse - dbSeek
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
- James Bott
- Posts: 4840
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
Re: xBrowse - dbSeek
Otto,
With what error?
You should either be using alias referencing or better, a database object.
James
With what error?
You should either be using alias referencing or better, a database object.
James
- Otto
- Posts: 6403
- Joined: Fri Oct 07, 2005 7:07 pm
- Has thanked: 24 times
- Been thanked: 2 times
- Contact:
Re: xBrowse - dbSeek
Hello James,
thank you for your answer.
Workarea not in use.
I only think that xBrowse should handle such input errors and act like a blackbox.
You can reproduce what I mean if you insert a
set order to
before:
oxBrw:bSeek := {|c| DbSeek( Upper( c ) ) }
Best regards,
Otto
Best regards,
Otto
thank you for your answer.
Workarea not in use.
I only think that xBrowse should handle such input errors and act like a blackbox.
You can reproduce what I mean if you insert a
set order to
before:
oxBrw:bSeek := {|c| DbSeek( Upper( c ) ) }
Best regards,
Otto
Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
- James Bott
- Posts: 4840
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
Re: xBrowse - dbSeek
Otto,
Try this:
oxBrw:bSeek := {|c| (::cAlias)->(DbSeek( Upper( c ) )) }
Take a look at TXBrowse:setRDD(). If you use that and set lAutoOrder =.t. then you bSeek will be set automatically by xbrowse.
James
Try this:
oxBrw:bSeek := {|c| (::cAlias)->(DbSeek( Upper( c ) )) }
Take a look at TXBrowse:setRDD(). If you use that and set lAutoOrder =.t. then you bSeek will be set automatically by xbrowse.
James
- nageswaragunupudi
- Posts: 10721
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Been thanked: 8 times
- Contact:
Re: xBrowse - dbSeek
oxBrw:bSeek := {|c| (::cAlias)->(DbSeek( Upper( c ) )) }
Even this fails if no order is set.
XBrowse assigns a default bSeek only when lAutoOrder is specified. When we specify lAutoOrder, it is better to leave the responsibility of defining bSeek to XBrowse.
If lAutoOrder is not specified and incremental search is desired, it is the responsibility of the programmer to specify a safe and appropriate codeblock for bSeek, taking care of the appropriate alias, checking indexorder, etc.
XBrowse supports any kind of data collection, not necessarily the well known dbf, array, recset, etc.
So when the codeblocks are directly defined by the programmer, he is expected to take full responsibility of the necessary checks.
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India