FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour error TOLEAUTO:SORT( 0 )
Posts: 434
Joined: Wed Jun 06, 2007 02:58 PM
error TOLEAUTO:SORT( 0 )
Posted: Wed Mar 05, 2014 10:19 AM

Hi,
I have this code:
cQr := "SELECT t0.articolo as codice, t0.descrarticolo as descrizione, t0.ordinamento as ORDINA FROM articoli t0" +;
"WHERE t0.ordinamento LIKE 'XYZ%' ORDER BY t0.ordinamento"

oDbf:Open( cQr , "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=FILE.mdb", 1, 3 )
oDbf:sort("ORDINA")

and get this error:
Error description: Error ADODB.Recordset/6 DISP_E_UNKNOWNNAME: SORT
Args:
[ 1] = C ORDINA

Stack Calls

Called from: => TOLEAUTO:SORT( 0 )

can anyone help me please?

FiveWin for xHarbour 24.02 - Feb. 2024 - Embarcadero C++ 7.60 for Win32 Copyright (c) 1993-2023

FWH 64 for Harbour 19.06 (MSVC++) Jun. 2019 - Harbour 3.2.0dev (r1904111533)

Visual Studio 2019 - Pelles C V.8.00.60 (Win64)
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
Re: error TOLEAUTO:SORT( 0 )
Posted: Wed Mar 05, 2014 02:29 PM
damianodec

Over the years I have found troubleshooting sql statements easier ( to see ) in this format ..

Code (fw): Select all Collapse
cQr := "SELECT t0.articolo as codice, "
cQr += "t0.descrarticolo as descrizione, "
cQr += "t0.ordinamento as ORDINA "
cQr += "FROM articoli t0 " 
cQr += "WHERE t0.ordinamento LIKE 'XYZ%' ORDER BY t0.ordinamento"


Try your sort like this ..
Code (fw): Select all Collapse
oDbf:sort("t0.ordinamento")


Rick Lipkin

Continue the discussion