Got a problem you cannot solve? Try here.
[MS]Mark
Posts: 39 Joined: Mon Dec 06, 2004 9:11 am
Location: UK
Post
by [MS]Mark » Mon Dec 13, 2004 12:00 pm
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 » Mon Dec 13, 2004 5:19 pm
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 » Tue Dec 14, 2004 3:51 am
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 » Tue Dec 14, 2004 6:10 am
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 » Tue Dec 14, 2004 7:06 am
files sent