I am taking data directly from a sql query via rowset and writing it to a txt file. I do this for 4 different processes currently but on my 5th process I need to look at the value from the previous row as well so I can do some loops to make up for missing numbers. (if current row is a 10 but previous is a 4 in a data field, I need to write output to the text for the missing numbers)
What would be the best way without writing to any inputs or viewers like a listbox (even hidden ones)?
Below is an over simplified version of what I am trying to do for those who work better with visuals
Dim sql As New ODBCDatabase
var a1rs as RowSet
dim SQLOutput as String = App.Process1Query
dim filename as String = filename.Text
Var output As TextOutputStream
Var documents As FolderItem = SpecialFolder.Documents
Var file As FolderItem = Documents.Child(filename+".txt")
If file <> Nil Then
output = TextOutputStream.Create(file)
try
a1rs = sql.SelectSQL(SQLOutput)
while Not a1rs.AfterLastRow
for each row as databaserow in a1rs
dim URN as String = row.column("URN").StringValue
dim PREVURN as String = row
If URN <> **(PREVIOUS ROW URN+1)** Then
FOR LOOP BLAH
End
next row
wend
end try
End