Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problems with adding records with the INSERT INTO-comman
Message
De
14/09/1998 18:05:01
 
 
À
14/09/1998 17:41:03
Koos Veel
Gamma Research
Aruba
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00136494
Message ID:
00136507
Vues:
15
Hi again Afier ---

If you know that a record will be added with the new values (are the values being changed from the existing record?), then you can do this:
* THISFORM.AddRecord (Custom form method)
LOCAL cLogin,cPassword
cLogin=THISFORM.txtLogin.Value
cPassword=THISFORM.txtPassword.Value
SELECT table
=TABLEREVERT(.T.)   && Revert current record
INSERT INTO table (login,password) VALUES (cLogin,cPassword)
The old record is not changed, the new one is added with current values.....

>
>We are using Visual FoxPro 5.0 and we are making a framework. For our security form we are using the INSERT INTO-command to add records. The Datasource of the textboxes is a table and we use optimistic table buffering. The problem is that if we want to add a record to the table with INSERT INTO we use the values of the textboxes as the source for the fields of the new record, but they already belong to another record (i.e. the record where the record pointer is located just before the insert into command). In FoxPro2.6 we solved this problem by using variables for the textboxes but this would defeat the purpose of the buffers inVisual FoxPro, so we would like to use the new way of doing this (no variables) but how do we add a record with the INSERT INTO command without messing up other records? Thank you for your time.
>
>Greetings,
>
>Afier Appelman
>Using the account of Koos Veel
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform