\"Write into Text File\" query/problem...

Got a problem you cannot solve? Try here.
Post Reply
[MS]Mark
Posts: 39
Joined: Mon Dec 06, 2004 9:11 am
Location: UK

\"Write into Text File\" query/problem...

Post by [MS]Mark »

I have the following lines in a script:

Code: Select all

Write into Text File $TARGETDIR$\\Settings.dat from Value $ODBCLOC$ (at start of file)
Write into Text File $TARGETDIR$\\Settings.dat from Value 1.2.3.4 (at end of file)
Write into Text File $TARGETDIR$\\Settings.dat from Value username (at end of file)
Write into Text File $TARGETDIR$\\Settings.dat from Value password (at end of file)
expecting Settings.dat to be:

Code: Select all

C:\\Database
1.2.3.4
username
password
but I'm getting:

Code: Select all

C:\\Database
C:\\Database




1.2.3.4
username
password
1.2.3.4
username
password
(there 4 blank lines between the first 2 copies of $ODBCLOC$ and the 1.2.3.4 address)...

Any ideas on what's going wrong or how to achieve a text file with those 4 lines in it?

Thanks :)

/edit - setting them to all Start of file gives:

Code: Select all

password
username
1.2.3.4
C:\\Database
C:\\Database
C:\\Database




1.2.3.4
username
password
1.2.3.4
username
password
sinan
Site Admin
Posts: 1035
Joined: Sat Nov 13, 2004 8:12 am
Contact:

Post by sinan »

That is very odd.
I ran several tests here. I was unable to reproduce the issue. If you send me your script, I might be able to make a few suggestions.

I got:

Code: Select all

C:\\Database 
C:\\Database 
C:\\Database 
1.2.3.4 
username 
password 
1.2.3.4 
username 
password
1.2.3.4 
username 
password
Something may be up with the value of your $ODBCLOC$ variable?
[MS]Mark
Posts: 39
Joined: Mon Dec 06, 2004 9:11 am
Location: UK

Post by [MS]Mark »

changed the code to do:

Code: Select all

Write into Text File $TARGETDIR$\\Settings.dat from Value  $ODBCLOC$$NEWLINE$1.2.3.4$NEWLINE$username$NEWLINE$password (at start of file)
and now outputs:

Code: Select all

C:\\Database
1.2.3.4
username
password
C:\\Database
1.2.3.4
username
password
which is getting somewhere but still can't see why it's outputting twice :?:
sinan
Site Admin
Posts: 1035
Joined: Sat Nov 13, 2004 8:12 am
Contact:

Post by sinan »

I really don't know :| If you send me your script I might be able to help more.
[MS]Mark
Posts: 39
Joined: Mon Dec 06, 2004 9:11 am
Location: UK

Post by [MS]Mark »

files sent :)
Post Reply