Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Weirdest tableupdate problem !
Message
 
To
11/06/2007 06:18:03
Yh Yau
Ingenuity Microsystems Sdn Bhd
Kuala Lumpur, Malaysia
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01231912
Message ID:
01232326
Views:
28
Can you post the real code?

>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
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform