Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using local DBC not Network DBC
Message
De
23/11/2001 03:25:40
 
 
À
22/11/2001 13:46:39
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
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:
00585064
Vues:
35
Thanks:)


>>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()
>>
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform