Ini-file, read write and empty lines. 
Author Message
 Ini-file, read write and empty lines.

I've made some code to read and write user settings in a ini file
There is no problem with that part

The ini looks something like this

[user1]
name=John
Tel= 03333-5566

[user2]
name=Karin
Tel= 03333-5567

I' use a form to creat and modify these settings
But now i want to creat a new user.
Every thing seems to work except for the empty line between the users.

the code to insert looks like this

Public Function SetMedewString(Section As String, Key As String, Content As
String) As String
  System.PrivateProfileString(MedewProfFile, Section, Key) = Content
End Function

Emptyline = ""
Emptyline = SetMedewString(medewcode, Emptyline, Emptyline)

this how ever creats a '=' between the users (like it should)

how to solve this problem???
please respond or notify me by email.. because i'm not in the newsgroups all
the time.



Tue, 11 Mar 2003 03:00:00 GMT  
 Ini-file, read write and empty lines.
Hi Chris,

You can't use the PrivateProfileString method to create blank lines in an
ini file, and you don't need blank lines in an ini file in order for it to
work right when being read by the PrivateProfileString method. It seems you
are trying to solve a problem that doesn't need to be solved.

--

Regards
Jonathan West - Word MVP
MultiLinker - Automated generation of hyperlinks in Word
Conversion to PDF & HTML
http://www.multilinker.com
Word FAQs at http://www.multilinker.com/wordfaq
Please post any follow-up in the newsgroup. I do not reply to Word questions
by email


Quote:
> I've made some code to read and write user settings in a ini file
> There is no problem with that part

> The ini looks something like this

> [user1]
> name=John
> Tel= 03333-5566

> [user2]
> name=Karin
> Tel= 03333-5567

> I' use a form to creat and modify these settings
> But now i want to creat a new user.
> Every thing seems to work except for the empty line between the users.

> the code to insert looks like this

> Public Function SetMedewString(Section As String, Key As String, Content
As
> String) As String
>   System.PrivateProfileString(MedewProfFile, Section, Key) = Content
> End Function

> Emptyline = ""
> Emptyline = SetMedewString(medewcode, Emptyline, Emptyline)

> this how ever creats a '=' between the users (like it should)

> how to solve this problem???
> please respond or notify me by email.. because i'm not in the newsgroups
all
> the time.



Wed, 12 Mar 2003 03:00:00 GMT  
 Ini-file, read write and empty lines.

It will work i know.

but this is just part of something i'm creating.
for that i want to keep my files in order. Without the blank lines
this ini looks a mess.

thats the complete reason for asking.
but thanks anyway.
to bad i'ts impossible, i thought it would be.


Quote:
>Hi Chris,

>You can't use the PrivateProfileString method to create blank lines in an
>ini file, and you don't need blank lines in an ini file in order for it to
>work right when being read by the PrivateProfileString method. It seems you
>are trying to solve a problem that doesn't need to be solved.

>--



Fri, 14 Mar 2003 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Read/Write INI Files w/Access 7.0

2. Reading and writing from and to ini files

3. read/write an .ini file

4. Reading and writing to an INI file?

5. Reading and Writing to .ini files - help please.

6. Read and Write to INI files

7. Reading/writing to an INI file

8. Reading / Writing an INI file

9. Reading / Writing an INI file

10. How to read and write an ini file with Qbasic 4.5

11. Reading/Writing to the Registry and .INI file???

12. Read/Write .INI File Routine?

 

 
Powered by phpBB® Forum Software