Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Tableupdate()
Message
From
27/09/1999 19:26:49
 
 
To
27/09/1999 18:42:27
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
00269667
Message ID:
00269704
Views:
20
John:

ACK!! ... now I'm told!!!
hmmmmm ... so, I don't buffer the base table, buffer the view and only TableUpdate the view. I'll try this - perhaps that's why I had to do a double TalbeUpdate.

Thanks John,

Mal


>Hi Malcolm,
>
>Ack! You shouldn't have the base tables and views open at the same time and, if for some reason that's required, DON'T buffer the base table. You should only be using TABLEUPDATE() on the view.
>
>>
>>I found that when updating a VIEW, you have to finalize the UPDATE by also =TableUpdate()ing the actual table(s). Once you UPDATE the actual table(s) =TableRevert() will no longer work on your last VIEW UPDATE - =TableRevert() will work if it's prior to =TableUpdate()ing the actual tables(s).
>>
>>Would be nice if someone can recommend a eaisier process - I'm all ears.
>>
>>Mal
>>====================
>>
>>>i have come across a problem and i'm not quite sure if it's mine or fox.
>>>
>>>some details ;
>>>
>>>when i run my app, i have code to create all the views that the app needs.
>>>
>>>the problem ;
>>>
>>>when i create the views at the start of the app, none of the tableupdate() calls work. if i don't create the views and simply assume that they are there and open them, then the tableupdate() calls work.
>>>
>>>i have spent many hours tracking this down and have can reproduce this with a small program.
>>>
>>>have you run into any similar issues? if so, how do i work around this within my app?
>>>
>>>thanks in advance for your assistance,
>>>
>>>pbd
>>>
>>>ps: here is the code just in case
>>>
>>>function broke
>>>
>>>close databases all
>>>open database payroll
>>>
>>>CREATE SQL VIEW "TEST" ;
>>> AS SELECT genericcode.* FROM genericcode genericcode ;
>>>WHERE genericcode.genericcodecategory == 'Labor Class'
>>>
>>>use test in 0
>>>cursorsetprop('buffering', 5, 'test')
>>>dbsetprop('test', 'View', 'SendUpdates', .t.)
>>>select test
>>>brow
>>>* manually change some data
>>>? tableupdate(1,.t.,'test')
>>>set
>>>
>>>return
>>>
>>>function works
>>>
>>>close databases all
>>>open database payroll
>>>use test in 0
>>>cursorsetprop('buffering', 5, 'test')
>>>dbsetprop('test', 'View', 'SendUpdates', .t.)
>>>select test
>>>brow
>>>* manually change the data
>>>? tableupdate(1,.t.,'test')
>>>
>>>return
Previous
Reply
Map
View

Click here to load this message in the networking platform