Dear all!
I have designed form and place there datagridview of table named USERS. I create cycle, reading the column contents and exequtes query (see bellow)
SELECT COUNT(*) AS Results
FROM vw_Reception
WHERE (PH17 >= @PH17) AND (PH17 < @PH18) AND (WO15 = @WO07)
Which I add in product dataset (designe mode), UsersTableAdapter.
this query is correct, and displayes results, when I click "Prewiew Data", but I need display results of these code(see bellow)
private void resultsToolStripButton_Click(object sender, EventArgs e)
{
for (quantity = 0; quantity < this.reportDataSet.Users.Rows.Count; quantity++)
{
name = this.usersDataGridView.Rows[quantity].Cells[1].Value.ToString();
result = this.usersTableAdapter.localResults(startDate, endDate, name).ToString();
//localresults is a name of scalar query
quantity++;
}
}
in the same datagridview(RESULTS column), where i load USERS table.
please, help.