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