>Hi to all,
>
>I have to develop an application that changes runtime the source DBC, or better I've 3 subdir with the a copy of a DBC and runtime (at the login I can say) the user choose which is the copy he wants to use.
>
>Which is the best way to developing in this case?
>I think to set runtime the database property of each cursor in DE, can this be enough ?
>
>Which is the right way to rename each DBC with a different name without having problems in form's DE ?
>
>thanks in advance for any suggestion
>
>Renato
Renato,
Same DBC with same name in different dirs ? If so just change path. Although DBC path is hardcoded in DE if your development dir is not one of them then it works. If you want to change DBC programmatically instead of path :
nMembers = amembers(aDEObjects,thisform.dataenvironment,2)
thisform.lockscreen = .t.
thisform.dataenvironment.closetables
with thisform.dataenvironment
for ix=1 to nMembers
if .&aDEObjects[ix]..baseclass = "cursor"
with .&aDEObjects[ix]
.database = cNewDBCPathandName
endwith
endif
endfor
endwith
thisform.dataenvironment.opentables
thisform.refresh
thisform.lockscreen = .f.
Cetin