Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Requery() - not sure what I am doing
Message
De
16/02/2006 12:30:15
 
 
À
16/02/2006 03:50:14
Information générale
Forum:
Visual FoxPro
Catégorie:
CodeMine
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP4
Network:
Windows 2000 Pro
Database:
Oracle
Divers
Thread ID:
01096677
Message ID:
01096792
Vues:
15
Can you just create a property to store the current recno() to before the update and then set it back after the update via a method? Like:

thisform.oCDE.CursObjekt.currec = RECNO(mytable or property that represents the table)
*--Update
thisform.oCDE.CursObjekt.gotorec(thisform.oCDE.CursObjekt.currec) && this method will position the pointer

You are not working with a listbox, correct?

>Hi,
>Have a cursor named CursObjekt:
> - csource = Objekt ( this is RV )
> - ctype = SQLPT
> - cwhere = none
> - cworkarea = Objekt
>
>I have a form with workarea = Objekt.
>All fields in Objekt are bounded with some controls except one (PS_IZV). This one filed which is 254 char long I update taking some values from 5 textboxes (not connected with any filed ) like this:
>
> _PS_IZV  =  PADR(thisform.imePP,50)         +;
>                     '-'+PADR(thisform.txt2.Value,50)+;
>                     '-'+PADR(thisform.txt3.Value,50)+;
>                     '-'+PADR(thisform.txt4.Value,50)+;
>                     '-'+PADR(thisform.txt5.Value,50)
>
>Then follow this line:
>
>*
>thisform.cmdatamanager.replace('Objekt','PS_IZV',_PS_IZV)      &&      0
>*
>*  thisform.oCDE.CursObjekt.UpdateRecord(2)                    &&      1
>*  thisform.cmdatamanager.UpdateAll()                          &&      2
>*  thisform.cmdatamanager.Requery('Objekt')                    &&      3
>*
>thisform.oCDE.CursObjekt.cWhere="BROJ==?pnBroj"                &&      4
>thisform.oCDE.CursObjekt.Requery(thisform.txtBroj.value)       &&      4a
>   *
>
>Now I am not sure what I am doing; and what I want is to change PS_IZV with _PS_IZV and
>make that change imediatelly available to all users . ( database is Oracle XE)
>
>a) I think 4 and 4a do this, and the position off current record remains preserved. (BROJ is Pk)
>
>b) thisform.oCDE.CursObjekt.Requery() and 3 do change but pointer is moved to first record.
>
>c) 1 and 2 preserve current position but I am not sure how really they act ?
>
>I also want to force somehow statemanager to activate/change state of revert button because it
>remains unacitve after line 0 while if PS_IZV is changed directly in from it of course becomes active
>
>Regards, Gojko
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform