Page 1 of 1

RecSet Problemas

PostPosted: Tue Jan 30, 2024 3:51 pm
by Willi Quintana
Mr Rao
You can help me please , I use RecSet, but not work correctly, see you this example: I used MaeiaDb

Code: Select all  Expand view

Function ListaUser(oCn)
local lOK, cData, oData, aRet := {}

lOk := .t.

cData := "SELECT nick FROM usuarios ORDER BY nick"

TRY
  oData := oCn:RecSet( cData )
CATCH
  lOK := .f.
END

If lOk

  xbrowse(oData)

  WHILE !oData:EOF()   // <--------- :EOF(), BOF()  With :RecSet not working, with RowSet  is Ok
    AADD(aRet, oData:nick )
    oData:Skip()
  ENDDO

EndIf

Return(aRet)