Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problems with adding records with the INSERT INTO-comman
Message
De
15/09/1998 07:40:01
Koos Veel
Gamma Research
Aruba
 
 
À
14/09/1998 18:05:01
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00136494
Message ID:
00136631
Vues:
25
Thank you very much for your answer.

Greetings,

Afier Appelman
Using the account of Koos Veel


>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.
>>
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform