Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Update view inserts empty record in base table
Message
De
22/10/2001 07:59:29
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00570682
Message ID:
00571589
Vues:
14
>>View MyView has a MyId field for which I have set the Default value as the function MakeNewId.
>>
>>This function does nothing more complex than look at a record in a table, increment the value of MyId and return the incremented value.
>>
>>The function is placed in the Stored Procedures of the DB and does what it's supposed to do.
>>
>>When I add a record to the view the expected values show up in the view.
>>
>>If I the issue a Tableupdate() the first record is inserted into the base-table with no values, and as a result I get a primary key violation on the second record.
>>
>>I can think of a few workarounds myself, so the question really is, is it possible to get the above scenario with SP functions and default values to work?
>>
>>TIA
>
>Peter,
>What fields are set in the Update Criteria tab of teh View Designer? If not using the View Designer, what fields are configured in the UpdatableFieldList property of the view?

Larry,
Thank you for your interest, I guess you'll start billing me anytime soon :-)
The problem sort of fixed itself (?). I needed to make some changes in the stored procedure, and presto- all of a sudden the update went through.

Initially the program complained about not being able to find the procedure MyProc- this whole thing seems to be a bit temperamental.

So, again thank you.
Peter Pirker


Whosoever shall not fall by the sword or by famine, shall fall by pestilence, so why bother shaving?

(Woody Allen)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform