Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Updatable combobox problem
Message
De
10/01/2002 16:10:25
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00600255
Message ID:
00603174
Vues:
28
>Thanks for your comments. I should have mentioned that my application must use free tables because there are still FoxPro 2.6 programs working against the same data. So I use one database that holds views only; no stored procedures or default values, or other luxuries offered by using dbc as intended.
>
>I found a workaround (though not the answer to the error message): when I moved the code to append blank to the Init of the form, right after opening the view, instead of waiting for the user to click a Save button, all worked as expected. So I just added a Tablerevert in the Cancel button. The mystery of the syntax error still haunts me, though.

Even if it's a free table, the view expects the key to behave like a primary, and may complain about double values (though I have seen it allow for them - I'm somewhat confused here). If you're inserting a key value instead of doing an Append Blank, it should get through. Are you sure there's not a record with an empty key already? Even if your view has a default value for the key, it will not be created until you tableupdate() the view (I learned this the hard way). I've found that the way to go is to have the key value inserted instead of doing an append blank.

I'm not sure that this sheds any more light on your problem, but wrote it just in case it may help understanding what's going on.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform