Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem with UPDATE-SQL
Message
 
 
À
16/12/1997 03:42:32
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00066137
Message ID:
00066171
Vues:
22
>Can anyone tell me where i'm going wrong in this code snippet?
>
>Error message: Alias 'text1' is not found!
>
>(code snippet)
>OPEN DATABASE fault_db
>USE tbl_faultform order fault_no
>
>UPDATE tbl_faultform;
>SET field1 = THISFORM.text1.value,;
>field2 = THISFORM.text2.value,;
>field3 = THISFORM.text3.value,;
>field4 = THISFORM.text4.value;
>WHERE field5 = THISFORM.text5.value
>
>CLOSE DATABASES
>
>Here the situation:
>i have a form on which i have 5 text fields and a commandbutton.
>after, i input values into the fields, i click on the button to update my table with the new values but, it gave me the above error message.
>
>Any help will be appreciated!
>Many thanks :)
>
>Mazlan Bin Mohammad

Try:

cValue1=ThisForm.Text1.Value
cValue2=ThisForm.Text2.Value
cValue3=ThisForm.Text3.Value
cValue4=ThisForm.Text4.Value
cValue5=ThisForm.Text5.Value

UPDATE tbl_faultform;
SET field1 = cValue1,;
field2 = cValue2,;
field3 = cValue3,;
field4 = cValue4;
WHERE field5 = cValue5
Mark McCasland
Midlothian, TX USA
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform