In my tests xbrowse incremental seek is working correctly. Assuming that you are using Spanish codepage.
But the above order does not appear to be correct. The order should be
CAMISA
CANDADO
CANILLA
CAÑA
CAÑO
CANOBOTE
This is because utf8_general_ci does not collate your data correctly. You will get correct collation if you use utf8_spanish2_ci or utf8_spanish_ci or latin1_spanish_ci
For me incremental seek is working correctly with Dolphin and also FWH's MySql.
This is my test program. Column is created with "utf8_spanish2_ci" collation.
- Code: Select all Expand view RUN
#include "fivewin.ch"
#include "tdolphin.ch"
REQUEST HB_LANG_ES
REQUEST HB_CODEPAGE_ESWIN
static oCn, oServer
static cHost := "localhost", cUser := "gnrao", cPwd := "secret", cDB := "fwh"
static cCollate := "utf8_spanish2_ci"
//----------------------------------------------------------------------------//
function Main()
HB_CDPSELECT("ESWIN")
HB_LangSelect( "ES" )
FWMYSQL_test()
Dolphin_test()
return nil
//----------------------------------------------------------------------------//
function FWMYSQL_test()
local oRs
local aData := { { "CAMISA" }, { "CAÑA" }, { "CANDADO" }, { "CANILLA" }, ;
{ "CAÑO" }, { "CANOBOTE" } }
FWCONNECT oCn HOST cHost USER cUser PASSWORD cPwd DATABASE cDB
if oCn:TableExists( "cana" )
ocn:DropTable( "cana" )
endif
oCn:CreateTable( "cana", { { "name", 'C', 20, 0, cCollate } }, .t., cCollate )
oCn:Insert( "cana", { "name" }, aData )
oRs := oCn:RowSet( "cana" )
oRs:Sort := "name" // Sorting at Client by RowSet
oRs:GoTop()
xbrowser oRs TITLE "FWH " + cCollate AUTOSORT
return nil
//----------------------------------------------------------------------------//
function Dolphin_test()
local oQry
CONNECT oServer HOST cHost USER cUser PASSWORD cPwd DATABASE cDB
oQry := oServer:Query( "select * from cana order by name" )
XBROWSER oQry TITLE "Dolphin " + cCollate AUTOSORT
return nil
//----------------------------------------------------------------------------//
Both FWH and Dolphin show the results in the correct order and both Incremental Seeks work correctly.
For some reason, if you can not change the collation and have to stay with "utf8_general_ci" only, FWH rowset still displays the data in correct order. Dolphin displays data the same way as sorted by the MySql server. The problem is with the Collation Order and has nothing to do with Dolphin.
To check please change the static variable
- Code: Select all Expand view RUN
static cCollate := "utf8_general_ci"
and re-execute the above program.
FWH works as expected if we let the client do the sorting.
Dolphin displays the data returned by the Server correctly. Even though the data is not correctly sorted, Dolphin still does an excellant job to do the incremental seek:
In your case you may get better results by copying data from Dolphin Query to Array and browse the array. Sorting and incremental seek work as expected.