>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 :
>*Form.init or method you're cahnging DBC
>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.
Thanks for your reply,
in another old message I've found something like your solution it was a :
thisform.SetAll('database', newdbcpathname, 'cursor')
in the Form.DataEnviroment.BeforeopenTables() event.
It sounds good and I haven't to close an reopen the tables.
My problem is that I've to do this in a class library object, and forms of a class haven't the DataEnviroment.
How can I do this or which the right event where put the code ?
I think that init is too late, maybe the Load() where in sometime I can write something that use the table.
TIA
Renato