Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Another wierd one
Message
From
08/03/2001 04:20:45
 
 
To
08/03/2001 03:39:38
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00482754
Message ID:
00483055
Views:
9
For Some reason I can't reply to any message lower than this one?

Thanks for the code... I will have to work something out maybe in the destroy event for clearing out indexes etc.

Will

Ok, I see. Here's what I'm using in my grid's base class:

*-- grid.Init()
*-- open cursor in Read-Write mode so that we can add index tags
=CursWrit(This.RecordSource)

* Program...........: CURSWRIT.PRG
*) Description.......: Re-opens a CURSOR created with SQL in read-write mode.
*) : RETURNs .t. if successful
* Calling Samples...:
* Parameter List....: tcAlias - optional CURSOR ALIAS
* Major change list.:
*--------------------------------------------------------------------------------------------------
LPARAMETER tcAlias

*-- check parameter. If omitted, default to currently selected ALIAS()
IF TYPE("tcAlias") <> "C" OR EMPTY(tcAlias)
tcAlias = ALIAS()
ENDIF

IF USED(tcAlias)

SELECT (tcAlias)

LOCAL lcDbf

lcDbf = DBF() && get handle to CURSOR
lcTempAlias = "A" + SYS(3) && temp name

USE (lcDbf) AGAIN IN 0 ALIAS (lcTempAlias) && open temp cursor in read-write mode
USE (lcDbf) AGAIN ALIAS (tcAlias) && re-open CURSOR with original ALIAS

USE IN (lcTempAlias) && close temp cursor
RETURN .t.
ELSE
*-- ALIAS not in use
RETURN .f.
ENDIF
Will Jones
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform