Hi all , i am trying to pull data from my labordtl table , but no matter how i change my code , it will return zero(only table name available ).
private void UpdateDatabase()
{
try
{
int rowUpdate = 0;
using (LaborAdapter laborAdapter = new LaborAdapter(this.oTrans))
{
laborAdapter.BOConnect();
// Get the dataset from the adapter
LaborDataSet dataset = laborAdapter.LaborData;
// Apply the WHERE condition
LaborDataSet.LaborDtlRow[] selectedRows =
(LaborDataSet.LaborDtlRow[])dataset.LaborDtl.Select("LaborType='I'");
foreach (LaborDataSet.LaborDtlRow row in selectedRows)
{
rowUpdate++;
row.JobNum = "NewValue"; // Replace with the field you want to update
}
// Update the changes
// laborDtlGroupAdapter.Update(dataset);
laborAdapter.Dispose();
}
System.Windows.Forms.MessageBox.Show(rowUpdate.ToString(), "Done");
}
catch(Exception e){
System.Windows.Forms.MessageBox.Show(e.Message.ToString(), "Done");
}
}