Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Local View Update Problem

Status
Not open for further replies.

spayne

Programmer
Feb 13, 2001
157
US
Here is a skeleton of the code I am using. If llTrue, the table1archive updates but table1 does not. If !llTrue, both table2 and table2archive update.

All views are set up to update the exact same way.

None of the tables or views are used before or after this code executes.

Does anybody have any idea why table1 will not update?

TIA,
Steve

IF llTrue
IF !USED("v_table1")
SELECT 0
USE v_table1
ENDIF
SELECT v_table1
=CURSORSETPROP("BUFFERING",5)

IF !USED("v_table1archive")
SELECT 0
USE v_table1archive
ENDIF
SELECT v_table1archive
=CURSORSETPROP("BUFFERING",5)

SELECT v_table1
ELSE
IF !USED("v_table2")
SELECT 0
USE v_table2
ENDIF
SELECT v_table2
=CURSORSETPROP("BUFFERING",5)

IF !USED("v_table2archive")
SELECT 0
USE v_table2archive
ENDIF
SELECT v_table2archive
=CURSORSETPROP("BUFFERING",5)

SELECT v_table2
ENDIF

SCATTER MEMVAR BLANK

m.field1 = "value1"
m.field2 = "value2"
.
.
.

IF llTrue
SELECT v_table1
APPEND BLANK
GATHER MEMVAR
=TABLEUPDATE(.T.,.T.)

SELECT v_table1archive
APPEND BLANK
GATHER MEMVAR
=TABLEUPDATE(.T.,.T.)
ELSE
SELECT v_table2
APPEND BLANK
GATHER MEMVAR
=TABLEUPDATE(.T.,.T.)

SELECT v_table2archive
APPEND BLANK
GATHER MEMVAR
=TABLEUPDATE(.T.,.T.)
ENDIF
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top