Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Of @@identity and surrogate keys - HELP!
Message
From
10/12/1999 11:31:34
 
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00301334
Message ID:
00301761
Views:
27
John et al,

Ok - I got this to work - but in what my Dear Deceased Father would call "a backassward way" in my opinion. In the process I have rediscovered what I believe to be a VFP Bug. Lemme 'splain ...

To Get it to work I do the following and pay attention to the tablupdate parms:

- append blank in the cursor
- fill in fields with values
- TABLEUPDATE(.T., .F.) - works fine as always
- retrieve my @@identity from the back end
-replace keyfield with @@identity essentially
now here's the kicker ...
- issue TABLEUPDATE(.F.,.F.)
this returns .t. even though nothin is sent to the back end! this action makes GetFldState() return 1111111 across the board!
now - I replace whatever other fields I wanna change
TABLEUPDATE(.T., .F.) again
and all is happy - sort of!

The bug(s) I see have to do with tableupdate(.f.,.f.) which are the default parms BTW. IT seems that issueing it like this ALWAYS returns .t. and that it NEVER actually updates or attempts to update the back. What it does do is "update" the front end cursor in as far as it resets the GetFldState() stuff as prviously mentioned. Interstingly - just changing it with SetFldState() doesn't seem to do the trick.

I am concerned about TABLUPDATE(.f.,.f.) not writing to the back-end as my logic (in later parts of my app) will dicate that I update records one ata time - retriving the identity keys after each one.

I could stil use some understanding/clarification as to what is happening here and why.
Ken
Ken B. Matson
GCom2 Solutions
Previous
Reply
Map
View

Click here to load this message in the networking platform