S
Stephanie Stowe
My brain is stuck in ADO and I seem to be having a hard time getting
unstuck. The MSDN help info on datasets is great for my understand what it
is and why it is and I love it. But I cannot get this simple little tutorial
to speak to me. I have
DateTime dWorkingDate = dtWorkingDate.Value;
dsSummary.Clear();
String sSql = "SELECT eDate, SUM(DATEDIFF([minute], eStart,
eEnd)) /60.00 AS Elapse, Comments FROM dbo.tEntries ";
sSql = sSql + "WHERE Day(eDate) = " + dWorkingDate.Day + " AND
Month(eDate) = " + dWorkingDate.Month + " AND Year(eDate) = " +
dWorkingDate.Year;
sSql = sSql + "GROUP BY eDate, Comments ";
SqlCommand cmd = new SqlCommand(sSql );
daSummary.SelectCommand = cmd;
daSummary.SelectCommand.Connection = cnSummary;
daSummary.Fill(dsSummary);
dsSummary is a dataset. I want to "loop" through all the rows and get the
value out of one of the columns. I have a single table, no relations... Can
someone give me a friendly nudge?
Let's say I want to get the value out of the first row in the elapse column.
What syntax? Thanks.
unstuck. The MSDN help info on datasets is great for my understand what it
is and why it is and I love it. But I cannot get this simple little tutorial
to speak to me. I have
DateTime dWorkingDate = dtWorkingDate.Value;
dsSummary.Clear();
String sSql = "SELECT eDate, SUM(DATEDIFF([minute], eStart,
eEnd)) /60.00 AS Elapse, Comments FROM dbo.tEntries ";
sSql = sSql + "WHERE Day(eDate) = " + dWorkingDate.Day + " AND
Month(eDate) = " + dWorkingDate.Month + " AND Year(eDate) = " +
dWorkingDate.Year;
sSql = sSql + "GROUP BY eDate, Comments ";
SqlCommand cmd = new SqlCommand(sSql );
daSummary.SelectCommand = cmd;
daSummary.SelectCommand.Connection = cnSummary;
daSummary.Fill(dsSummary);
dsSummary is a dataset. I want to "loop" through all the rows and get the
value out of one of the columns. I have a single table, no relations... Can
someone give me a friendly nudge?
Let's say I want to get the value out of the first row in the elapse column.
What syntax? Thanks.