Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DefaultValue
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
The Mere Mortals Framework
Titre:
Divers
Thread ID:
00464751
Message ID:
00469123
Vues:
30
Allan,

>2. Used the view and appended a blank. I tried to browse the view but no matter what I tried I got a “CANNOT INSERT AN EMPTY ROW FROM A VIEW INTO ITS BASE TABLE” error. I replaced the key field (contractno) with 2000 using “REPL”. I could then browse the view, which had a blank record with a key field of 2000. >>

This is normal VFP behavior for row-buffered cursors.

<<3. Note that it did not obtain the next unique id from the id table by using the newid().>>

That's correct...if you've got NewID() set as the default for the base table (and not in the view), NewID() will not be run when manually appending a record to the view.

>4. While using the contracts table I appended a blank. When I browsed the table the new blank record with the next unique in the key field. So that works fine.>>

That's right...

<<5. I ran the application and then the input form, which uses a page frame. When I clicked on the input the form in question. When I clicked the “NEW” button the first record of the list on the form had its key field (contracts) changed from “1” to “1654” the next unique ID. This immediately triggered “ERROR 11” the “=SETFLDSTATE” error.>>

Can you post more specifics about this error message?

>1. What are the possible reasons for this problem?

As mentioned above, I need a little more info...

>2. Which function actually appends the blank in the business object?

CDataBehavior.New()

>3. I think it maybe the “ALLOWNEW()”, how ever I cannot find it <g>

Actually, it's not (as mentioned above). AllowNew() is method on KBizObj into which you can place code that returns a logical value indicating whether the business object should allow new records to be created. AllowNew() is checked in KBizObj.New().

>4. Which phrase in the views program will cause the “SEND SQL UPDATES” checkbox to be checked?

DBSetProp('LV_CONTVIEW', 'View', 'SendUpdates', .T.)


>I have attached a section of the “VIEWS.PRG” in case you can notice any errors. Thank you for your time your assistance is much appreciated. I am keen to visit you again soon to maybe do your advanced course. Have you released the next version of the Mere Mortals Framework yet?>>

Not yet, but soon..

Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform