Good afternoon friends.
I have a hard time on a project I am developing and I hope I can count on your help.
I created a Grid Object (following image) with the first row and first column fixed with the header (columns) and specific values (rows). I want to search a Sqlite3 database for a particular item using three variables as filters and according to the result, specify a cell in the grid to have that value.
I am using the version of SqLite3 in the following image and the following command, also below, but the result is not displayed in the specified cell (is blank)
Can someone help me?
Thanks in advance for the attention of friends.
Grid.Refresh("Grid_Agenda")
function FilterAgenda()
sVar1 = Input.GetText("Input_Profissional");
sVar2 = Input.GetText("Input_Data");
sVar3 = Grid.GetCellText("Grid_Agenda", 1, 0);
for row in db:nrows ("SELECT * FROM Agendamento WHERE DiaAgendado LIKE '%"..sVar2.."%' and Profissional LIKE '%"..sVar1.."%' and HoraAgendada LIKE '%"..sVar3.."%'") do
local NewRow = Grid.InsertRow("Grid_Agenda", -1, false)
Grid.SetCellText("Grid_Agenda", 1, 1, row.Nome, false);
end
end
-- Refresh the grid
Grid.Refresh("Grid_Agenda")
I have a hard time on a project I am developing and I hope I can count on your help.
I created a Grid Object (following image) with the first row and first column fixed with the header (columns) and specific values (rows). I want to search a Sqlite3 database for a particular item using three variables as filters and according to the result, specify a cell in the grid to have that value.
I am using the version of SqLite3 in the following image and the following command, also below, but the result is not displayed in the specified cell (is blank)
Can someone help me?
Thanks in advance for the attention of friends.
Grid.Refresh("Grid_Agenda")
function FilterAgenda()
sVar1 = Input.GetText("Input_Profissional");
sVar2 = Input.GetText("Input_Data");
sVar3 = Grid.GetCellText("Grid_Agenda", 1, 0);
for row in db:nrows ("SELECT * FROM Agendamento WHERE DiaAgendado LIKE '%"..sVar2.."%' and Profissional LIKE '%"..sVar1.."%' and HoraAgendada LIKE '%"..sVar3.."%'") do
local NewRow = Grid.InsertRow("Grid_Agenda", -1, false)
Grid.SetCellText("Grid_Agenda", 1, 1, row.Nome, false);
end
end
-- Refresh the grid
Grid.Refresh("Grid_Agenda")
Comment