I am trying to code a form that will allow the user to review data that is in a mysql database and change a boolean field (ignorit). If ignorit is changed to yes, then later code will ignore that line in the database.
But, first I need to display the data. I have generated the following code, and it works to the point where I am trying to display the array with the treeview and then I get an error.... any ideas?
--- code section ----
Dim recno as integer
Dim tRecno as Integer
Dim I as Integer
dim id as Integer
Dim tId as Integer
Dim DataLine As Array = New Array()
TreeView1.Show()
TreeView1.SetHeaderLabel("Transaction ID", 0)
TreeView1.SetHeaderLabel("Date",1)
TreeView1.SetHeaderLabel("Account",2)
TreeView1.SetHeaderLabel("Transaction",3)
TreeView1.SetHeaderLabel("Ticker",4)
TreeView1.SetHeaderLabel("Amount",5)
TreeView1.SetHeaderLabel("Shares",6)
TreeView1.SetHeaderLabel("Posted",7)
TreeView1.SetHeaderLabel("Ignore",8)
TreeView1.SetColumnWidth(0, 400)
TreeView1.RootIsDecorated = False
strSql = "SELECT * FROM postings;"
rslt = Query.Run(strSql)
sRecordsId = Records.Open(gsDatabase, strSql)
recno = Records.Length(sRecordsId)
tRecno = Recno
for I = 1 to 50
If gsDatabase then
if sRecordsId then
DataLine{I, "ID"} = Records.Value(tRecno, "ID")
DataLine{I, "Date"} = Records.Value(tRecno, "date")
DataLine{I, "AccountNo"} = Records.Value(tRecno, "accountno")
DataLine{I, "Transact"} = Records.Value(tRecno, "transact")
DataLine{I, "Ticker"} = Records.Value(tRecno, "ticker")
DataLine{I, "Amount"} = Records.Value(tRecno, "amount")
DataLine{I, "Shares"} = Records.Value(tRecno, "shares")
DataLine{I, "Posted"} = Records.Value(tRecno, "posted")
DataLine{I, "Ignoreit"} = Records.Value(tRecno, "ignorit")
End If
End If
tRecno = tRecno - 1
Next I
id = TreeView1.AppendChild("")
tId = Dateline{I,"ID"}
TreeView1.SetCaption(id, 0, tId)
' TreeView1.SetCaption(id, 1, Dateline{I,"Date"})