Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with TABLEUPDATE()
Message
From
13/02/2002 11:52:42
Lutz Scheffler (Online)
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
 
 
To
13/02/2002 09:15:03
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00615959
Message ID:
00619563
Views:
28
Hi Bernard,

Do you mean TABLEUPDATE() (i.e. singlerow) put your data in the table?
If you anwser this 'yes', than you can use a loop as mentioned in Message#617142.

But this is a kludge, try
LOCAL;
 laRecErr(1),;
 laErr(1),;
 lnLoop
SELECT FinalView
TABLEUPDATE(2, .T., 'FinalView',laRecErr) 
DO CASE
 CASE VARTYPE(laRecErr)='L'
*all ok. the update runs perfectly
*still not in table? Go back to viewdefinition.
 CASE laRecErr=-1
 SET ASSERT ON
  AERROR(laErr)
  ASSERT .F. MESSAGE 'Havy Error, check Array laErr'
 OTHERWISE
  FOR lnLoop = 1 TO ALEN(laErr)
   GO (laErr(lnLoop))
   ASSERT EMPTY(GETFLDSTATE(-1)) MESSAGE 'This rec fails multirow'
   ASSERT !TABLEUPDATE(0,.T.) MESSAGE 'Single row works fine'
  ENDFOR
ENDCASE
I still have fears about your viewdefinition, especially those multi keys.

Agnes
>Hi Agnes,
>
>When trying your suggestion, I noticed that I did not have any problem with TABLEUPDATE(). I guess the culprit was TABLEUPDATE(1, .T., 'FinalView'). I will have to read up on it to understand exactly what happened.
>
>Thank you for your help.
>
>Bernard
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform