Hi JC,
If you have created a dataadapter using the designer and generated the
dataset with that, than you need only that fill with the right dataadapter
and datasetname (strong one)
I give it with a non strongly typed dataset also, however than your program
becomes fast a mesh. This should be enough when you made all with the
designer.
dap1.Fill(das1) ' the names you where using
VacHrsThisYr.Text = das1.Compute("Sum(TotalVacationHrs)", "Employee =
'ARBUCKLEP'").ToString
However when you first want to try from the outside
Dim cnn1 As New OleDb.OleDbConnection("Provider=Microsoft.Jet.OLED B.4.0;
Data Source=J:\TCMW\Database\TCMW.mdb")
Dim dap1 As New OleDb.OleDbDataAdapter("SELECT Employee, CheckDate,
TotalVacationHrs from PYCheckHistory", cnn1)
Dim das1 As New DataSet
dap1.Fill(das1)
MessageBox.ShowRows.Count.ToString)
VacHrsThisYr.Text =(das1.Tables(0).Compute("Sum(TotalVacationHrs)",
"Employee = 'ARBUCKLEP'").ToString
I thought that this should work ( I typed it in here in this message and
mostly I make than typos)
Cor