Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
TimeStamp Reprise
Message
From
14/12/1999 14:50:28
 
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00302651
Message ID:
00303578
Views:
30
John,

That works - for the obvious reason that VFP will use everything in the key field list any way. In fact, that works (uses the timestamp) even with the wheretype = 1.
What is also interesting, is that the Remote View - which DOES use the timestamp in its where clause (with the wheretype set to 4), does NOT have the timestamp field in its key fields list!

In short - I'm still calling it a bug or at least a real poor lack of documentation somewhere. You idea will work on a practical level even though I believe it to be a "work-around" rather than the answer - but hey - if it works practically - thats the biggest thing.

Thanks much for your help. I appreciate the time you've spent on this. Let me know if you find out anything else.

Ken

>Hi Ken...
>
>OK.... I have this problem solved...
>
>The trick is to add the timestamp field name to the keyfieldlist property of the cursor:
>
>CursorSetProp( 'KeyFieldList',"id,lastedited","cCustomer")
>
>
>In my sample, lastedited is the timestamp field.
>
>Here is the sample code to setup the cursor:
>
>lnHandle = sqlconnect("test","sa","")
>=sqlexec(lnHandle,"exec getcustomers","cCustomer")
>CursorSetProp('Tables',"customers","cCustomer")
>CursorSetProp('UpdatableFieldList',"id,name,lastedited","ccustomer")
>CursorSetProp('UpdateNameList',"id customers.id,name customers.name lastedited customers.lastedited","cCustomer")
>CursorSetProp( 'KeyFieldList',"id,lastedited","cCustomer")
>CursorSetProp( 'UpdateType', 1,"cCustomer")
>CursorSetProp( 'WhereType', 4,"cCustomer")
>CursorSetProp( 'FetchMemo', .T.,"cCustomer")
>CursorSetProp( 'SendUpdates', .T.,"cCustomer")
>CursorSetProp( 'UseMemoSize', 255,"cCustomer")
>CursorSetProp( 'FetchSize', 100,"cCustomer")
>CursorSetProp( 'MaxRecords', -1,"cCustomer")
>CursorSetProp( 'Tables', 'dbo.customers',"cCustomer")
>CursorSetProp( 'Prepared', .F.,"cCustomer")
>CursorSetProp( 'CompareMemo', .T.,"cCustomer")
>CursorSetProp( 'FetchAsNeeded', .F.,"cCustomer")
>CursorSetProp( 'FetchSize', 100,"cCustomer")
>CursorSetProp( 'BatchUpdateCount', 1,"cCustomer")
>CursorSetProp('Tables',"customers","cCustomer")
>
>
>Let me know how things work out!! :)
Ken B. Matson
GCom2 Solutions
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform