Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cursor deleted lines
Message
 
À
16/04/2007 12:24:12
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Divers
Thread ID:
01216294
Message ID:
01216318
Vues:
22
Maybe if we remove RECCOUNT() and show RECNO() this will works :-)
set deleted on
create cursor cursr1 (myfield c(3))
insert into cursr1 values ('AAA')
insert into cursr1 values ('BBB')
insert into cursr1 values ('CCC')
insert into cursr1 values ('DDD')

select cursr1 
index on myfield tag myfield 
set order to tag myfield in cursr1 

crtotallines1=alltrim(str(reccount('cursr1')))

messagebox(crtotallines1)


select cursr1 
if NOT seek ('CCC','cursr1','myfield')
   messagebox('prob',0+16)
   return
endif
delete in cursr1 for cursr1.myfield='CCC'
SET DELETED OFF
select cursr1
=seek ('CCC','cursr1','myfield')
crtotallines2=alltrim(str(RECNO('cursr1')))
messagebox(crtotallines2)
SET DELETED ON




set deleted on
create cursor cursr1 (myfield c(3))
insert into cursr1 values ('AAA')
insert into cursr1 values ('BBB')
insert into cursr1 values ('CCC')
insert into cursr1 values ('DDD')

select cursr1 
index on myfield tag myfield 
set order to tag myfield in cursr1 

crtotallines1=alltrim(str(RECNO('cursr1')))

messagebox(crtotallines1)


select cursr1 
if NOT seek ('CCC','cursr1','myfield')
   messagebox('prob',0+16)
   return
endif
lnRecNo = RECNO([cursr1])
BROWSE NORMAL
delete in cursr1 for cursr1.myfield='CCC'

select cursr1
SET DELETED OFF
GOTO lnRecNo
BROWSE NORMAL
crtotallines2=alltrim(str(RECNO('cursr1')))
messagebox(crtotallines2)
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform