Table.Clear() does not
Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance
Next message: sonnv: "Determine the ADO connection to SSL-enabled SQLServer is secured?"
Date: Thu, 16 Sep 2004 11:29:08 -0700
I have an Access Database that I'm connected to. The query and Fill()
commands work as expected. However, I want to requery the database and
display only the pertinent fields.
I have the table linked to a DataGrid, and each time it requeries, it just
appends the new rows. It does not clear the table.
Here is a portion of the code that does the query.
this.CustomersTableDA_Select.CommandText = "SELECT * FROM Customers WHERE
(PhoneNumber = \'" + this.txtQueryPhone.Text + "\')";
this.CustomersTable.Clear();
this.CustomersTableDA.Fill(this.datasetDS, "CustomersTable");
if (this.BindingContext[this.datasetDS, "CustomersTable"].Count == 0)
{
MessageBox.Show ("No Records");
}
Next message: sonnv: "Determine the ADO connection to SSL-enabled SQLServer is secured?"
Relevant Pages
- Re: Current Row or similar for query-based combo box
... The requery solution is working very well. ... You can use the form's current event to force the combobox to be requeried. ... form.in my combobox query I am able to get the intended result. ... rows that need other values to display will suddenly display blank. ... (microsoft.public.access.queries) - Re: how do I clear the content of a screen before displaying new data by running requery ?
... I crated a form based on a query. ... I declared an afterupdate event in which I run the requery ... if I don't select a default salesperson name - the form will load empty, ... a sales person with 8 different type of activities, it will display all 8 of ... (microsoft.public.access.gettingstarted) - Re: MS Access and a java query program
... > As a project for Uni, I have to create a program that will query a MS ... > Access database and display the results in a tabular format. ... (comp.lang.java.databases) - Re: database gets placed in a State that prevents it from being opened
... You might need to issue a requery before accessing the data on the 2nd ... > i'm using the Timer Event in a Form to run a Query by setting ... The query fills a table with data that needs to be accessed ... > another Access database that links to that table. ... (microsoft.public.access.queries) - drop down control displaying records in form
... The query that the records come from has a field called status. ... I want to have an afterupdate event on a combo box that will requery the form and display the status requested. ... ElseIf status = "closed" Then ... (microsoft.public.access.formscoding) |
|