OK me again (warning long message).
Did some more troubleshooting. I was able to get the proper values from OldVal() CurVal() by opening the same buffered cursor using two sessions with a simple Use() commands.
However, it doesn't look that CurVal() works with a Cursoradapter using a native...
OK. Many hours later and I'm still stuck. AARGH!!!
I decided to open up two VFP 8.0 sessions. In each I create the same cursor by instantiating a cursoradapter.
I make changes in one, Tableupdate(), and changes go through. Underlying table is modified, which shows up in both sessions.
Change...
No name_l is not a key. I have two key values. ins_dat_key and order_key. (Just noticed ins_dat_key is really too long). Anyway, name_l is just a last name value for an insurance adjuster.
The table is part of a database container. I don't know if that should have an effect on it.
I'm...
Sorry I messed up the code is as follows:
Select CA1
REPLACE name_l WITH 'blah'
? CURVAL('name_l') &&Johnson
? OLDVAL('name_l') &&Johnson
TABLEUPDATE()
? OLDVAL('name_l') &&blah
? CURVAL('name_l') &&blah -- Table has been updated
SELECT CA2
? OLDVAL('name_l') &&Johnson
? CURVAL('name_l')...
I looked at it again. In the command window I instantiated the same cursor adapter twice. They each contain name_l = 'Johnson'. Then I do the following:
Select CA1
REPLACE name_l WITH 'blah'
? CURVAL('adjuster') &&Johnson
? OLDVAL('adjuster') &&Johnson
TABLEUPDATE()
? OLDVAL('adjuster') &&blah...
Thanks for the response.
Buffering is automatically enabled with cursor adapter to optimistic row buffering. I also enabled multilocks. These settings aren't having any effect on my updates.
What kind of effect does a transaction and rollback have on Curval() and OldVal()? I don't perform a...
Can Curval() and OldVal() be used with cursoradapter cursors?
I get an error 1585 (update conflict) when I save changes to 1st cursor after saving changes to 2nd cursor. But when I try to resolve the conflict, the changes from the 2nd cursor (which are now in the underlying table don't show up...
Trying to do an incremental search.
Created cursor adapter that contains a cursor with insurance adjuster full names in 'adjuster' field (John Doe, Jane Doe, etc).
My select command is:"select distinct ins_info.adjuster from ins_info".
Also after cursor is created I create an index: INDEX...
This is the info I found on Autoincrement function:
Buffered Tables
Visual FoxPro does not perform any autoincrementing management relative to buffered tables. All appended and inserted records have autoincrementing values generated regardless of whether table or row buffering is active. In the...
Thanks for the quick reply.
Just wanting to know if there is another way to do this. I got vfp 8 using native datasource. I know vfp 9 has a function that automatically returns the pk when you create a new record using the CA. Version 8 doesn't have that.
I start by creating an empty cursor...
How do you retrieve a Primary Key from a table that has been automatically generated using auto increment? The auto generated PK is the only field that is unique.
Using a cursor adapter to insert a new record, how can I retrieve the Primary key so that it can be used as a foreign key in another...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.