Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Table buffering and SQL
Message
From
15/08/2001 06:06:11
 
 
To
15/08/2001 06:04:57
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00543946
Message ID:
00543950
Views:
12
>Ahhh
>Just figured out a way...
>
>Don't use SQL! - if I use Copy To then it works fine!
>
>Thanks again Kev
>
>>>Hi All,
>>>
>>>I have a problem that is bugging me...
>>>
>>>
>>>Create cursor fred (fld1 n(2),fld2 C(10))
>>>
>>>Insert into fred values (1,'Record1')
>>>Insert into fred values (2,'Record2')
>>>Insert into fred values (3,'Record3')
>>>
>>>=CursorSetProp('Buffering',5)
>>>
>>>Go Bott
>>>Delete
>>>
>>>Select * from fred                  && Returns 3 records
>>>Select * from fred where !deleted() && Returns 3 records <b>(Including the deleted one)</b>
>>>
>>>
>>>The implication from the above is that if a table is buffered then SQL only looks at the committed changes.. is this the case?
>>>
>>>In my form I can add or delete records, but before calling the 'add' form I create a cursor with all the existing records to stop duplicate creation.
>>>The problem comes when I delete a record then try and add the same record again the add routine sees this as a duplicate even though it is deleted.
>>>
>>>Suggestions anyone? (we don't have a DBC, so RV's aren't much use) and I was hoping to avoid a custom deleted field.
>>>
>>>TIA
>>>
>>Will
>>
>>Yes, SQL will only look for committed records, I had the same thing when I was amending a table and then checking the table using SQL and didn't get the required results until I committed them
>>
>>Kev

I'll remember that, I'm forever issuing TABLEUPDATE().

Kev
Previous
Reply
Map
View

Click here to load this message in the networking platform