Information générale
Catégorie:
Codage, syntaxe et commandes
Hi, Juan...
It seems to me that this info will be interesting for you.
My russian college Alexander Korolev have found very coll way
to make cursor updatable and I consider that he understood how
the cursor is really created.
He guesses that cursors can be created in two ways:
- in memory
- physically on disk.
Second possibility can be reached if someome uses NOFILTER
clause in SELECT SQL statement. In this case you can use
following code
select ..... from ..... into cursor myCursor NOFILTER
=ReUse('myCursor')
function reUse
lparameters _alias_
local _dbf_
_dbf_ = dbf(_alias_)
use (_dbf_) again alias ReUsedDB in 0
use in (_alias_)
use (_dbf_) again alias (_alias_) in 0
use in ReUsedDB
select (_alias_)
return
Cursor may even be indexed by structural tag, with first tag
being created before ReUse() function. For instance:
select ..... from ..... into cursor myCursor NOFILTER
index on Field1 tag TAG1
=ReUse('myCursor')
index on Field2 tag TAG2
index on Field3 tag TAG3
But you should take into account that NOFILTER can reduce
performance.
Hope this helps,
Ilie.
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement