Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
WwAPI question
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
West Wind Web Connection
Titre:
WwAPI question
Divers
Thread ID:
00757114
Message ID:
00757114
Vues:
54
I am trying to use West Wind's wwAPI to read and write an .INI file. Reading works fine, but writing back to the .INI does not work when I'm trying to update an existing key in the .INI file. It does work if I am adding a new key, but not trying to update an existing key. Does anyone know if the WriteProfileString function will "update" (over right) the value for an existing key? And, if so, how to make it work?

Also, no matter what I pass the function it always returns .T.

Here's an example:

Contents of the INI file:

[MYSECTION]
EXPORTPATH=F:\OURAPP\EXPORT\

I execute the following...

o = CREATEOBJECT("wwApi")
o.WriteProfileString("myini.ini","MYSECTION","EXPORTPATH","F:\SOMEOTHERPATH\EXPORT")

... but the EXPORTPATH entry does not change in the INI.

If I do this ...

o.WriteProfileString("myini.ini","ANOTHERSECTION","EXPORTPATH","F:\SOMEOTHERPATH\EXPORT")

... the INI file then looks like this ...

[MYSECTION]
EXPORTPATH=F:\OURAPP\EXPORT\

[ANOTHERSECTION]
EXPORTPATH=F:\SOMEOTHERPATH\EXPORT\

Thank you.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform