Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Application with more DBC
Message
 
À
02/09/1998 04:11:55
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00132228
Message ID:
00132232
Vues:
15
>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
Renato Bertuol (EMail:renato.bertuol@elmec.it
Homepage:www.geocities.com/SiliconValley/Horizon/3216)
Elmec Informatica (URL www.elmec.it)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform