Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Why is TableUpdate() failing?
Message
De
08/10/1999 00:52:56
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00273914
Message ID:
00274076
Vues:
32
>>>Is there a way to tell why TableUpdate is returning .F. ??
>>>
>>>I'm making changes to a buffered record, then trying to make the update but it is failing.
>>>
>>>I know that you can find the record number of a failed update when updating a table (using an error record array), but I can't figure out why this particular record is failing to update.
>>>
>>>Any hints?
>>
>>Take a look at the Aerror() function...
>>
>>
>>Wayne
>
>Thank you Wayne. That is a very easy way to tell why things are bombing out!
>Now I have to figure out how to fix the problem.
>
>I'm trying to APPEND BLANK to a cursor with buffermode = 5. That much works, and I can modify the fields of the new record. However, when i try to issue a TableUpdate(.T., .T., 'CursorName'), I get the following error:
>
>"Cannot insert an empty row from a view into its base table(s)."
>
>The row is not empty, but for some reason FoxPro thinks it is...

Does this view use fields from more than one table? Are you trying to insert records into only one table? Are more than one table listed in the views "Tables" property (DBGETPROP)?

A common cause of this error is when a multi-table view is used for updating one table. Since none of the fields for the other table are checked as updatable, VFP tries to write an UPDATE statement for that table that contains no fields to update. The solution is to remove the table from the view's tables property.
Erik Moore
Clientelligence
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform