Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Requery() - not sure what I am doing
Message
De
16/02/2006 03:50:14
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
CodeMine
Titre:
Requery() - not sure what I am doing
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP4
Network:
Windows 2000 Pro
Database:
Oracle
Divers
Thread ID:
01096677
Message ID:
01096677
Vues:
51
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform