Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using local DBC not Network DBC
Message
De
22/11/2001 13:46:39
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
 
À
22/11/2001 09:36:15
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00549515
Message ID:
00584958
Vues:
35
>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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform