Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
CA and archive data
Message
 
À
11/06/2004 04:41:35
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00912392
Message ID:
00912800
Vues:
6
I got it to work thanks. Now some additional observations/questions:

If you change .SelectCmd for cursors you can get it to work if Cursorfill is also used:

oCA.SelectCmd="SELECT * FROM TABLE1"
oCA.CursorFill()
SELECT test
?ALIAS()
LIST

oCA.SelectCmd="SELECT * FROM TABLE2"
oCA.CursorFill()
SELECT test
?ALIAS()
LIST

****************

Help text says that allowdelete, allowupdate, allowinsert are Read/write at design time and run time

to test this I tried next:

selectCmd has defined in CA.init as follows:
text to This.SelectCmd noshow
SELECT * (This.Tables) Order by 2 desc
endtext
Cursor is changed in option group click event
With Thisform.DataEnvironment.cad_InOut
  If This.Value = 1
    If !Thisform.lArchive
      Thisform.lArchive = .T.
      .Tables = "ARCIN"
      .AllowUpdate = .F.
      .AllowDelete = .F.
      .AllowInsert = .F.
      .CursorRefresh()
    Endif
  Else
    If Thisform.lArchive
      Thisform.lArchive = .F.
      .Tables = "INOUT"
      .AllowUpdate = .T.
      .AllowDelete = .T.
      .AllowInsert = .T.
      .CursorRefresh()
    Endif
  Endif
Endwith
Both tables has same structure INOUT has ~2000 records, ARCIN has the 100 very first records from the INOUT. Also both has the same alias CAD_INOUT what is then used as a record source in a grid

When ARCIN is selected as a source (option group value 1) and next commands are ran in grid row (command button click):

DELETE && This marks current record from the CAD_INOUT cursor as deleted
Tableupdate(.T.,.T.,"CAD_INOUT") && This removes a record with same ID from INOUT not from ARCIN

Why this is happening?

AT
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform