Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Duplicate primary key
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Duplicate primary key
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01423254
Message ID:
01423254
Vues:
120
Hi,
I have a customer that transfers information between 2 systems. both are VFP applications and have the exact same file structure, VFP databases. I take a call from system A and create a dbf with the call number on it an dplace it in a particular folder, there are memo fields so I end up with 2 files 1234.dbf and 1234.fpt.
System B has an import button, when you click on it the code reads all of the files in a folder into an array and then checks the file name against the primary key field. if it find a match it skips the file, if not then it appends the contents of the file. the problem is that every so often a file might be exported a second time and therefore exist in the System B table but the code does not find a match on the primary key but when it goes to append it a primary key violation comes up. if i go out of the application and back in the problem still persists, it never finds the call number on the table but fails on the append.
I read the files in using
ADIR(myarray,'*.dbf')
and use a seek on the table using the index on the primary key
anyone any idea how to get around this?
~M
Go raibh maith agat

~M
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform