Hi Andrus,
>
>I need to change CursorSource property because at run-time, files are at different locations.
>The only reasonable place to do it seems to be BeforeOpentables event.
>However, it is not possible to loop through cursors: dataenvironment does not have objects collection and cursor object names are changed.
>
To "scan" the DE Objects use the aMembers function. Try something like this:
lcDbc = fullpath(dbc())
lnMembers = aMembers(laMembers, This.DataEnvironment, 2)
for x = 1 to lnMembers
with eval("This.DataEnvironment." + laMembers[x])
if .BaseClass = "Cursor" ;
and !empty(.DataBase)
.DataBase = lcDbc
endif
endwith
endfor
HTH,
Bill Armbrecht
Bill Armbrecht
VFP MCP