Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Memvars not concatenating correctly
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00132475
Message ID:
00132844
Vues:
23
Hi Jim,

My app is structured very much like the Tas Traders sample. I have an application object and environment object. I've added a method to the environment object to read directory paths from an INI file, one of which is the path to the DBC. These paths are assigned to properties of the environment class. In the case of the DBC, this property is oEnvironment.dbcPath

The application object property 'cDatabase' contains only the database file name with no path. In the application Init method, I tried to concatenate the application property 'cDatabase' onto the environment property 'dbcPath' like this.
lcDataBase = this.oEnvironment.dbcPath + this.cDatabase
OPEN DATABASE (lcDataBase)

Repeatedly, lcDataBase would contain only the value of the property oEnvironment.dbcPath

So I tried this work around which worked and still puzzles me.
Instead of using an INI file, I used a datatable and assigned the field value to the property oEnvironment.dbcPath - no problems. But I don't know why.

The only difference I can see is that using an INI file, I read the entry value into a buffer, then trimmed the buffer and assigned the result to the dbcPath property. Using a datatable, this buffer isn't used. The buffer was not explicitly declared public nor local.

My problem is fixed but I don't feel particularly triumphant.

Thanks,
--Carl

>Carl,
>
>Could you show us how you are concatenating the values?
Carl Chambers
Cardol Data Systems
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform