error TOLEAUTO:SORT( 0 )

error TOLEAUTO:SORT( 0 )

Postby damianodec » 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 17.09 - Sep. 2017 - Embarcadero C++ 7.00 for Win32
FWH 64 for Harbour 19.06 (MSVC++) Jun. 2019 - Harbour 3.2.0dev (r1904111533)
Visual Studio 2019 - Pelles C V.8.00.60 (Win64)
User avatar
damianodec
 
Posts: 419
Joined: Wed Jun 06, 2007 2:58 pm
Location: Italia

Re: error TOLEAUTO:SORT( 0 )

Postby Rick Lipkin » Wed Mar 05, 2014 2:29 pm

damianodec

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

Code: Select all  Expand view  RUN

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: Select all  Expand view  RUN

oDbf:sort("t0.ordinamento")
 


Rick Lipkin
User avatar
Rick Lipkin
 
Posts: 2666
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 45 guests