Hi again,
I am doing a Dataset Loop and outputting the data values out to a file. It appears to not have ALL the data in the line but has the last half of the line of data.
It appears to have something to do with the double-quotes around the string values returned from the column values.. No?
David
Field data
Field data
Last edited by David W. on Wed Feb 22, 2006 5:19 pm, edited 1 time in total.
Field data
Dataset loop save retrieved row to user variable as comma-separated text. To access to any field you should use variable as array.
For example:
You use dataset loop and assign current row to variable named RowVar
{RowVar(0)} contains a value of first field
{RowVar(1)} - second field
{RowVar(2)} - third field
etc.
For example:
You use dataset loop and assign current row to variable named RowVar
{RowVar(0)} contains a value of first field
{RowVar(1)} - second field
{RowVar(2)} - third field
etc.
I'm afraid I haven't understood what do you mean.It appears to not have ALL the data in the line but has the last half of the line of data.
Last edited by Oleg on Sat Feb 25, 2006 3:13 am, edited 1 time in total.
Field data
Well I was happy with the comma-delimited string and just want to output that entire string to the file and not have to output each individual field using the {RowVar(0)} syntax.
Can I do that?
Can I do that?
Field data
Yes of course. You can write comma-separated string into file via Write Text File with Append parameter within Dataset Loop.
For example:
Delete file CommaData.txt
Dataset Loop
//append current line into end of file
Write Text File CommaData.txt with append
end loop
As result, you will get a comma-separated text which containes the data from dataset.
For example:
Delete file CommaData.txt
Dataset Loop
//append current line into end of file
Write Text File CommaData.txt with append
end loop
As result, you will get a comma-separated text which containes the data from dataset.
Field data
See example below:
;**********************
;* RoboTask Task file *
;* Do not edit! *
;**********************
[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|-1
CatID=INTEGER|1272562679
ContinueOnError=INTEGER|0
ExternalName=STRING|"Task134"
Hide=INTEGER|0
ID=INTEGER|1152923633
Name=STRING|"Dataset Loop (export)"
Priority=INTEGER|3
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|0
ToLog=INTEGER|3
[Actions]
Action1=FOLDER
Action2=FOLDER
Action3=FOLDER
Action4=FOLDER
Action5=FOLDER
[Actions\Action1]
ActionID=STRING|"A_FILE_DELETE"
Enabled=INTEGER|-1
Name=STRING|"Delete File"
Params=FOLDER
[Actions\Action1\Params]
Count=STRING|"1"
deletedirs=STRING|"0"
file0=STRING|"c:\data\export.txt"
subdir=STRING|"0"
ToRecycleBin=STRING|"0"
[Actions\Action2]
ActionID=STRING|"A_LOOP_DATASET"
Enabled=INTEGER|-1
Name=STRING|"Dataset Loop"
Params=FOLDER
[Actions\Action2\Params]
commatext=STRING|"0"
connectionstring=STRING|"Provider=Microsoft.Jet.OLEDB.4.0;Da ta Source=C:\data\notice.mdb;Persist Security Info=False"
override=STRING|"0"
password=STRING|"1980019594193411933931376"
sql=STRING|"""select * from proposals"""
var2=STRING|"ROW"
withmemo=STRING|"0"
[Actions\Action3]
ActionID=STRING|"A_FILE_TEXTWRITE"
Enabled=INTEGER|-1
Name=STRING|"Create text file c:\data\export.txt"
Params=FOLDER
[Actions\Action3\Params]
fileexists=STRING|"1"
filname=STRING|"c:\data\export.txt"
line0=STRING|"{row}"
linecount=STRING|"1"
[Actions\Action4]
ActionID=STRING|"A_LOOP_END"
Enabled=INTEGER|-1
Name=STRING|"End Loop"
[Actions\Action5]
ActionID=STRING|"A_VARIABLES_REMOVE"
Enabled=INTEGER|-1
Name=STRING|"Remove variable ""ROW"""
Params=FOLDER
[Actions\Action5\Params]
varname=STRING|"ROW"
;**********************
;* RoboTask Task file *
;* Do not edit! *
;**********************
[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|-1
CatID=INTEGER|1272562679
ContinueOnError=INTEGER|0
ExternalName=STRING|"Task134"
Hide=INTEGER|0
ID=INTEGER|1152923633
Name=STRING|"Dataset Loop (export)"
Priority=INTEGER|3
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|0
ToLog=INTEGER|3
[Actions]
Action1=FOLDER
Action2=FOLDER
Action3=FOLDER
Action4=FOLDER
Action5=FOLDER
[Actions\Action1]
ActionID=STRING|"A_FILE_DELETE"
Enabled=INTEGER|-1
Name=STRING|"Delete File"
Params=FOLDER
[Actions\Action1\Params]
Count=STRING|"1"
deletedirs=STRING|"0"
file0=STRING|"c:\data\export.txt"
subdir=STRING|"0"
ToRecycleBin=STRING|"0"
[Actions\Action2]
ActionID=STRING|"A_LOOP_DATASET"
Enabled=INTEGER|-1
Name=STRING|"Dataset Loop"
Params=FOLDER
[Actions\Action2\Params]
commatext=STRING|"0"
connectionstring=STRING|"Provider=Microsoft.Jet.OLEDB.4.0;Da ta Source=C:\data\notice.mdb;Persist Security Info=False"
override=STRING|"0"
password=STRING|"1980019594193411933931376"
sql=STRING|"""select * from proposals"""
var2=STRING|"ROW"
withmemo=STRING|"0"
[Actions\Action3]
ActionID=STRING|"A_FILE_TEXTWRITE"
Enabled=INTEGER|-1
Name=STRING|"Create text file c:\data\export.txt"
Params=FOLDER
[Actions\Action3\Params]
fileexists=STRING|"1"
filname=STRING|"c:\data\export.txt"
line0=STRING|"{row}"
linecount=STRING|"1"
[Actions\Action4]
ActionID=STRING|"A_LOOP_END"
Enabled=INTEGER|-1
Name=STRING|"End Loop"
[Actions\Action5]
ActionID=STRING|"A_VARIABLES_REMOVE"
Enabled=INTEGER|-1
Name=STRING|"Remove variable ""ROW"""
Params=FOLDER
[Actions\Action5\Params]
varname=STRING|"ROW"
Field data
That is exactly what I am doing...
Ah, nevermind. Sorry. The data was bogus which made it look like it was incorrect, but in fact is correct. Thanks.
DW
Last edited by David W. on Sat Feb 25, 2006 1:04 pm, edited 1 time in total.