Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cursor Adapter Requests
Message
 
To
01/09/2004 17:32:54
General information
Forum:
Visual FoxPro
Category:
Visual FoxPro Beta
Miscellaneous
Thread ID:
00931561
Message ID:
00938633
Views:
17
Hi Aleksey

I finally found the problem. I had a command in my cursoradapter class that resulted in the CursorStatus reverting to 0 which explains why nothing was ever triggered. It works perfectly now.

Thanks
Simon White

>>Hi Alexsey
>>
>>I finally got around to implementing your suggestion but I have another question. When I use row buffering and move to another record my custom DeleteCmd and UpdateCmd methods are not called. Do I have to issue a Tableupdate(.T.) to trigger these methods? If so then it is not quit like ODBC which triggers an update as soon as the record pointer is moved without having to call TableUpdate(.T.)
>>
>>Thanks
>>Simon White
>>
>
>Hi Simon,
>
>I don't see this behavior. In the following code, SKIP triggers appropriate method as expected.
>
>Thanks,
>Aleksey.
>
>
>CLEAR
>CLOSE DATABASES all
>SET MULTILOCKS ON
>
>CREATE CURSOR foo (f1 I, f2 c(10))
>
>INSERT INTO foo VALUES (1,"1")
>INSERT INTO foo VALUES (2,"2")
>INSERT INTO foo VALUES (3,"3")
>CURSORSETPROP("Buffering",3)
>
>LOCAL oCA as CursorAdapter
>
>oCA=CREATEOBJECT("CustomUpdateCA")
>oCA.CursorAttach("foo")
>oCA.UpdatableFieldList="f1,f2"
>
>GO 2
>replace f2 WITH "New_2"
>?"Before SKIP"
>SKIP
>?"After SKIP"
>GO 3
>DELETE
>?"Before SKIP"
>SKIP -1
>?"After SKIP"
>APPEND BLANK
>?"Before SKIP"
>SKIP -1
>?"After SKIP"
>
>
>DEFINE CLASS CustomUpdateCA AS CursorAdapter
>
>	InsertCmdDataSourceType="Native"
>	UpdateCmdDataSourceType="Native"
>	DeleteCmdDataSourceType="Native"
>
>	InsertCmd="this.CustomInsert()"
>	UpdateCmd="this.CustomUpdate()"
>	DeleteCmd="this.CustomDelete()"
>
>	FUNCTION CustomInsert()
>		?PROGRAM()
>	ENDFUNC
>
>	FUNCTION CustomUpdate()
>		?PROGRAM()
>	ENDFUNC
>
>	FUNCTION CustomDelete()
>		?PROGRAM()
>	ENDFUNC
>ENDDEFINE
>
>
Simon White
dCipher Computing
Previous
Reply
Map
View

Click here to load this message in the networking platform