Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Weirdest tableupdate problem !
Message
De
11/06/2007 06:18:03
Yh Yau
Ingenuity Microsystems Sdn Bhd
Kuala Lumpur, Malaisie
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Titre:
Weirdest tableupdate problem !
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01231912
Message ID:
01231912
Vues:
69
We use remote views to update a set of parent and child records to SQL server wrapped in a transaction.
The pseudocode goes something like:-
begin transaction
select parenttable
generate primary key
tableupdate(1,.f.,"parenttable")
select childtable
generate primary key for child table, populate parent's primary key as surrogate key.
tableupdate(1,.f.,"childtable")
if sqlcommit(connection)
end transaction
else
rollback etc
endif

The funniest thing is that when we run the tableupdate for the child table, the primary key and surrogate keys of the first record of the child table changes to a 9 digit number from nowhere and the rest of the field values disappears! We browse before the tableupdate line and everything is fine, we browse after the tableupdate line, the first line suffers the problems mentioned, after that we run into a C5 error and is thrown out. Both primary and secondary keys are integer values.
We use the same method of updating for other parent and child tables (e.g sales, purchases etc) with no problems, only this particular file.
Hope someone can help.
Regards
Yau
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform