Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Application with more DBC
Message
From
02/09/1998 04:11:55
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00132228
Message ID:
00132229
Views:
15
>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 :
*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.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform