Hello Miguel,
Yes, it works this way. So, this is no bug, it is to be used like this,
because the documentation says that we do not need to do that extra
OrdWildSeek() at the beginning.
So, OR this is a bug OR we need to change the docs. ;-)
Thanks Miguel.
Patrick
On Mon, Oct 27, 2008 at 4:55 PM, Miguel Angel Marchuet <
[EMAIL PROTECTED]> wrote:
> Try this code
>
> Function Main()
>
> REQUEST DBFCDX
> REQUEST HB_GT_WIN
>
> dbCreate( "testdbf", { { "NAME", "C", 25, 0 } }, "DBFCDX", .t., "aTest"
> )
>
> aTest->( dbAppend() ) ; aTest->NAME := "Test 1"
> aTest->( dbAppend() ) ; aTest->NAME := "Test 2"
> aTest->( dbAppend() ) ; aTest->NAME := "Test 3"
>
> aTest->( dbCommit() )
>
> aTest->(dbCreateIndex( "Testdbf", "Field->NAME", {|| field->NAME}, NIL
> ))
> aTest->(OrdSetFocus("Testdbf"))
> aTest->(dbGoTop())
>
> IF aTest->(OrdWildSeek("T*", .F.))
> ? aTest->NAME
> ENDIF
> WHILE aTest->(OrdWildSeek("T*", .T.))
> ? aTest->NAME
> ENDDO
>
> aTest->(dbCloseArea())
>
> Return nil
>
> OrdWildSeek( <cWildCardString>, ;
> [<lCurrentRec>] , ;
> [<lBackwards>] )
>
> Best regards,
> Miguel Angel Marchuet
>
>
> Patrick Mast escribió:
> > Hello,
> >
> > Seems like OrdWildSeek() does NOT include the first record in a database.
> > Please try this sample:
> >
> >
> //----------------------------------------------------------------------------------------------------//
> > Function Main()
> >
> > REQUEST DBFCDX
> >
> > dbCreate( "testdbf", { { "NAME", "C", 25, 0 } }, "DBFCDX", .t.,
> "aTest" )
> >
> > aTest->( dbAppend() ) ; aTest->NAME := "Test 1"
> > aTest->( dbAppend() ) ; aTest->NAME := "Test 2"
> > aTest->( dbAppend() ) ; aTest->NAME := "Test 3"
> >
> > aTest->( dbCommit() )
> >
> > aTest->(dbCreateIndex( "Testdbf", "Field->NAME", {|| field->NAME}, NIL
> ))
> > aTest->(OrdSetFocus("Testdbf"))
> > aTest->(dbGoTop())
> >
> > WHILE aTest->(OrdWildSeek("T*", .T.))
> > ? aTest->NAME
> > ENDDO
> >
> > aTest->(dbCloseArea())
> >
> > Return nil
> >
> //----------------------------------------------------------------------------------------------------//
> >
> > This sample returns:
> > Test 2
> > Test 3
> >
> > While it should return:
> > Test 1
> > Test 2
> > Test 3
> >
> > Patrick
> >
> > -------------------------------------------------------------------------
> > This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge
> > Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> > Grand prize is a trip for two to an Open Source event anywhere in the
> world
> > http://moblin-contest.org/redirect.php?banner_id=100&url=/
> > _______________________________________________
> > xHarbour-developers mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/xharbour-developers
> >
> > __________ Información de ESET NOD32 Antivirus, versión de la base de
> firmas de virus 3559 (20081027) __________
> >
> > ESET NOD32 Antivirus ha comprobado este mensaje.
> > http://www.eset.com
> >
> >
> >
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> xHarbour-developers mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/xharbour-developers
>
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
xHarbour-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xharbour-developers