Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
IAnywhere ODBC
Message
 
To
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:
00986901
Views:
41
James

Even more bizare stuff hapening his side.

I have created a simple table with 3 fields. PKKEY (Integer, PK and autonumber), Name (Varchar 20) and Surname Varchar 20).

In fox I create the view and browse and append 2-3 records. I can see it in ASA without tableupdate (buffering set to 3). I close the table the data dissapear in ASA.

I repeat the process but this time set buffering to 5. and issue Tableupdate. Returns .T. Same thing data is on ASA side. I requery() and the new PKkey values as assigned by ASA apears. I close and the data is gone again on ASA.

The only diference is the autonumberng on the PK field. I changed the Varchar to char but still the same.

When running it with my application table and updating as you sugested the record is deleted on the view because of the force. It is however not updated on ASA side

If I call tableupdate without the force I get the following error:
laerr[2] = Update conflict in cursur 'SETUP'.

I really cannot understand this.

Thanks for your help so far.

>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