Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Replace and tableupdate problem
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Replace and tableupdate problem
Miscellaneous
Thread ID:
00233228
Message ID:
00233228
Views:
48
We are having a weird problem the chunk of code below.
The second replace statement does not execute or update the table sporadically.
The other two tables are always as far (as we can tell) updated.
Some setting are form.buffermode = 2 (optimistic)
DataEnvironments buffermodeoverride = 1 (use the form's mode)
Our systems (works fine here) Pentiums I 150-233
Their system Pentium III 350 +


**** Code follows
**** cday is a cursor from the three tables
SELECT contactid, deldate from cday3 into array idarray
FOR J = 1 to alen(idarray, 1)
* DNM * Adding a comment to the notes field to indicate that the 3 day * DNM * letter was sent...
REPLACE guest.dealnotes with guest.dealnotes + chr(13); + chr(10) + dtoc(date()) + ;
" 3 Day Letter Sent" all for contactid = idarray[J, 1];
in guest

* DNM * Setting day3ltr field to .T. to indicate that a 3 day letter *.DNM * was sent...
REPLACE day3ltr with .T. all for contactid = idarray(J,1); and deldate = idarray(J, 2) in delivered

* DNM * Inserting a contact type 9 (letter sent) into the viscon * DNM * table...
INSERT into viscon(contactid,futdate,condate,scheduled,;
contype) values (idarray[J, 1],date() + 3,date(),4,9)
ENDFOR

* DNM * Updating the tables to hold changes... were some problems in
* DNM * the past when we didn't do this...
TABLEUPDATE(.t., .f., "guest")
TABLEUPDATE(.t., .f., "delivered")
TABLEUPDATE(.t., .f., "viscon")
*** End Code

What causes the delivered table to update correctly intermittantly, and then not update other times ?
According to the help file, the buffer mode would be Optimisitic Row and a TABLEUPDATE would
be implicity applied with a row change, so we shouldn't HAVE to specify the tableupdates...?

Thanks in advance....

Leo Lang
Reply
Map
View

Click here to load this message in the networking platform