By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,330 Members | 1,277 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,330 IT Pros & Developers. It's quick & easy.

Reload query Not the total dataset

P: n/a
Hi

I have a listbox that I want to update when the an item is updated/added.
Now the listbox is attached to a query. Now I tried to just reload the
query by modifying the forms loadDataSet and filldataset subroutines but
when I do that the table values do not mesh which the lstbox anymore. As
well, I have looked at the data adapters select statement to try and update
it but to no avail.

Any suggestions?

The code below is the code that I used to reload the query.

Thanks in Advance

Bill

public void qryLoadDataSet()

//--------------------------------------------------------------------------
-
//
{
MemSys.dsFamily objDataSetTemp;
objDataSetTemp = new MemSys.dsFamily();
try
{
this.FillDataSet(objDataSetTemp);
}
catch (System.Exception eFillDataSet)
{
// Add your error handling code here.
throw eFillDataSet;
}
try
{
objdsFamily.qryFamName.Clear();
objdsFamily.Merge(objDataSetTemp);
}
catch (System.Exception eLoadMerge)
{
// Add your error handling code here.
throw eLoadMerge;
}

}


//--------------------------------------------------------------------------
-
public void qryFillDataSet(MemSys.dsFamily dataSet)

//--------------------------------------------------------------------------
-
//
{
dataSet.EnforceConstraints = false;
try
{
this.connFam.Open();
this.daFQryFamName.Fill(dataSet);
}
catch (System.Exception fillException)
{
// Add your error handling code here.
throw fillException;
}
finally
{
dataSet.EnforceConstraints = true;
this.connFam.Close();
}

}
Nov 13 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.