Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Network:
Windows 2008 Server
Hi Lucien.
>I've finally gotten around to retrofitting some older tables in my app with primary and foreign keys. Is there a method to "backfill" those tables with key values after they've been re-structured, avoiding the dreaded 'uniqueness of [key field] is violated' error? New installs aren't, of course, a problem. It's the existing installations that I'm referring to. My app uses VMP as a framework, and Stonefield DB toolkit.
If you make the primary key field Integer (Auto-Inc), SDT will automatically fill in the values for you when you update the table (it uses RECNO() for the key value). If you're not doing that, then you have to do a multi-stage update as Tamar states.
Doug
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement