markstaylor
03-07-2010, 01:40 PM
Need help with this code.
I run a query based on what the user selected and pull all data that matches the query DECRYPTIT then send to a grid object. It's not working correct.
I get random results. If i select recordid and name only the name is displayed but in the record id column and nothing is in the name field.
PLEASE HELP.
if sqlString ~= "" then
tbResults = SQLite.QueryToTable(db, sqlString);
TextFile.WriteFromString("AutoPlay\\Docs\\report.csv", headerString .."\r\n", false);
for nRow =1, tbResults.Rows do
sRowData = "";
for nCol = 1, tbResults.Columns do
sRowData = Crypto.BlowfishDecryptString(tbResults.Data[nRow][tbResults.ColumnNames[nCol]],"passoword")
sRowData= String.Replace(sRowData, "\r\n", " ");
sRowData= sRowData ..",";
end
TextFile.WriteFromString("AutoPlay\\Docs\\report.csv", sRowData .."\r\n", true);
end
DialogEx.Show("ReportResults", true, nil, nil);
end
I run a query based on what the user selected and pull all data that matches the query DECRYPTIT then send to a grid object. It's not working correct.
I get random results. If i select recordid and name only the name is displayed but in the record id column and nothing is in the name field.
PLEASE HELP.
if sqlString ~= "" then
tbResults = SQLite.QueryToTable(db, sqlString);
TextFile.WriteFromString("AutoPlay\\Docs\\report.csv", headerString .."\r\n", false);
for nRow =1, tbResults.Rows do
sRowData = "";
for nCol = 1, tbResults.Columns do
sRowData = Crypto.BlowfishDecryptString(tbResults.Data[nRow][tbResults.ColumnNames[nCol]],"passoword")
sRowData= String.Replace(sRowData, "\r\n", " ");
sRowData= sRowData ..",";
end
TextFile.WriteFromString("AutoPlay\\Docs\\report.csv", sRowData .."\r\n", true);
end
DialogEx.Show("ReportResults", true, nil, nil);
end