Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
WwAPI question
Message
From
24/02/2003 13:51:26
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
West Wind Web Connection
Title:
WwAPI question
Miscellaneous
Thread ID:
00757114
Message ID:
00757114
Views:
49
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.
Next
Reply
Map
View

Click here to load this message in the networking platform