Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
CursorAdapter - BeforeInsert
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00916893
Message ID:
00917024
Vues:
12
You could always use the SetFldState() function to set that field's status to modified. You are correct that you would need to do this prior to the BeforeInsert event.

You could also do something like:
cInsertCmd = strtran(cInsertCmd, 'INTO MYTABLE (', 'INTO MYTABLE (cFieldName, ')

cInsertCmd = strtran(cInsertCmd, 'VALUES (', 'VALUES (?RTRIM(crsMyCursor.cFieldName), ')
Of course you would only do that if a test for the existence of that field in cInsertCmd is negative. I would also use the Case-Sensitivity flag of your choice in the STRTRAN() functions.

>It does look like that. But if crsMyCursor.crsField1 did not have a its value changed prior to the BeforeInsert event it will not be included in the InsertCmd.
>
>
>
>>Yes, but the InsertCmd should look like
>>
>>...VALUES (?crsMyCursor.crsField1, ?crsMyCursor.crsField2, ...)
>>
>>and not have the actual field values in the SQL command. If this is not true, can you post what the actual Insert command looks like?
>>
Mark McCasland
Midlothian, TX USA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform