txt-file parsing
Hi all!
I need to execute sql query to MS SQL Date base.
Use this metod:
ExecWait '"sqlcmd" -S "$DB_server" -U "$DB_user" -P "$DB_password" -d "$DB_name" -i "$Temp\NS_Fix_IIRF\get_revision.sql" -o "$Temp\NS_Fix_IIRF\result.txt"'
Result:
STR
--------------------
0400
(обработано строк: 1)
Parsing file:
ClearErrors
FileOpen $0 "$Temp\NS_Fix_IIRF\result.txt" r
IfErrors done
${While} $1 != "0400" ;Определяем номер ревизии по результату запроса к БД
FileRead $0 $1
StrCpy "$1" "$1" 4
${EndWhile}
StrCpy "$REV" $1
FileClose $0
done:
If in file is present 0400 - all work fine. Else cycle holds infinitely.
How fix this problem?
Tnx!