Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
IAnywhere ODBC
Message
From
14/02/2005 18:31:21
James Blackburn
Qualty Design Systems, Inc.
Kuna, Idaho, United States
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2000 Server
Miscellaneous
Thread ID:
00985894
Message ID:
00986841
Views:
37
Willie,

I would leave out the error array and see what happens.
from the help file.

cErrorArray


Specifies the name of an array created when nRows = 2 and changes to a record cannot be committed. The array contains a single column containing the record numbers of the records for which changes could not be committed. If you include an array name, you must include either a table or cursor alias cTableAlias or a work area number nWorkArea.
if not tableupdate(1,.t.,"setup")
dimension laerr[1]
?aerror(laerr)
?laerr[2]
endif 
I have not used views since vfp7 but I will play with this a little tonight and see what I can come up with.


>James,
>
>I am trying with the view again.
>1. Select Table
>2. Select fields including two fields that make up the PK key (BID + AGENT)
>3. Under Update Criteria click on update all and specify the Key fields (been selected for me)
>4. run the query
>5. Set buffering: WAIT WINDOW CURSORSETPROP("Buffering",5,'setup') && returns true
>6. Modify the data in a row
>7. DIMENSION atemp[1,1]
>8. WAIT WINDOW TABLEUPDATE(.t.,.t.,'Setup','atemp') && Returns True
>
>What happens now is that the record shows as deleted in the cursor while the wait window is displaying ".T."
>
>After the wait window the record disapear from the view (Setup)
>
>Only if I issue Requery() the record is returned without the changes
>
>Here is the SQL for the view:
>
>
>SELECT Setup.bid, Setup.agent, Setup.company, Setup.password, Setup.cell;
> FROM ;
>     DBA.Setup Setup
>
>DBSetProp(ThisView,"View","SendUpdates",.T.)
>DBSetProp(ThisView,"View","BatchUpdateCount",1)
>DBSetProp(ThisView,"View","CompareMemo",.T.)
>DBSetProp(ThisView,"View","FetchAsNeeded",.F.)
>DBSetProp(ThisView,"View","FetchMemo",.T.)
>DBSetProp(ThisView,"View","FetchSize",100)
>DBSetProp(ThisView,"View","MaxRecords",-1)
>DBSetProp(ThisView,"View","Prepared",.F.)
>DBSetProp(ThisView,"View","ShareConnection",.F.)
>DBSetProp(ThisView,"View","AllowSimultaneousFetch",.F.)
>DBSetProp(ThisView,"View","UpdateType",1)
>DBSetProp(ThisView,"View","UseMemoSize",255)
>DBSetProp(ThisView,"View","Tables","DBA.Setup")
>DBSetProp(ThisView,"View","WhereType",3)
>
>DBSetProp(ThisView+".bid","Field","DataType","C(5)")
>DBSetProp(ThisView+".bid","Field","UpdateName","DBA.Setup.bid")
>DBSetProp(ThisView+".bid","Field","KeyField",.T.)
>DBSetProp(ThisView+".bid","Field","Updatable",.F.)
>
>DBSetProp(ThisView+".agent","Field","DataType","C(10)")
>DBSetProp(ThisView+".agent","Field","UpdateName","DBA.Setup.agent")
>DBSetProp(ThisView+".agent","Field","KeyField",.T.)
>DBSetProp(ThisView+".agent","Field","Updatable",.F.)
>
>DBSetProp(ThisView+".company","Field","DataType","C(30)")
>DBSetProp(ThisView+".company","Field","UpdateName","DBA.Setup.company")
>DBSetProp(ThisView+".company","Field","KeyField",.F.)
>DBSetProp(ThisView+".company","Field","Updatable",.T.)
>
>DBSetProp(ThisView+".password","Field","DataType","C(10)")
>DBSetProp(ThisView+".password","Field","UpdateName","DBA.Setup.password")
>DBSetProp(ThisView+".password","Field","KeyField",.F.)
>DBSetProp(ThisView+".password","Field","Updatable",.T.)
>
>DBSetProp(ThisView+".cell","Field","DataType","C(10)")
>DBSetProp(ThisView+".cell","Field","UpdateName","DBA.Setup.cell")
>DBSetProp(ThisView+".cell","Field","KeyField",.F.)
>DBSetProp(ThisView+".cell","Field","Updatable",.T.)
>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform