Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using local DBC not Network DBC
Message
From
22/11/2001 13:46:39
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
22/11/2001 09:36:15
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00549515
Message ID:
00584958
Views:
34
>Dragan do you have your production copy of this code at hand
>
>It looks like it would be much simpler to use than what I am doing at present.

Had you reacted faster, I may still have had the code, but the company went bust and the server's gone. Anyway, what I was doing was to have a list of dbcs and directories in use, and compared whatever I had in the oCursor.Database and oCursor.Cursorsource with the list, and replaced accordingly. Sample added in the code below. I was basically replacing the development paths with actual paths relative to the current location in production.
In each form's .dataenvironment.BeforeOpenTables there was a call to
oApp.CheckDataEnv(this).

>
* app.CheckDataEnv
>lParam oDE
lcPeopleDbc="..\people\data\people.dbc"
lcPeoplePath="..\people\data"
lcThingsDbc="..\things\data\things.dbc"
lcThingsPath="..\things\data"
>=amembers(aCurs, oDe,2)
>for each cCursor in aCurs
>  oCursor=eval(cCursor)
>  if oCursor.baseclass='Cursor'
>     if !empty(oCursor.database)
         do case
            case atc("people.dbc", oCursor.database)#0
>              oCursor.database=lcPeopleDbc
            case atc("things.dbc", oCursor.database)#0
>              oCursor.database=lcThingsDbc
        ...endcase
>     else   && a free table
         do case
            case atc("people\", oCursor.CursorSource)#0
               oCursor.cursorsource=forcepath(oCursor.CursorSource,lcPeoplePath)
            case atc("things\", oCursor.CursorSource)#0
               oCursor.cursorsource=forcepath(oCursor.CursorSource,lcthingsPath)
>     endif
>  endif
>endfor
>dodefault()
>

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform