The query is not the problem, I am using a tableadapter from the designer that has a stored procedure. And everytime i call the tableadapter it takes long, its only three records in the database, so it should not be taking 15 seconds, this is my first time using mysql, i am normally using SQL Server 2008.
Keep in mind there is two combo boxes, and they are both related to each other, so they can select any item from either combo box. So if i to reload the combo box base upon the item select in the combo box, the minute i select an item in combo box a , I have to reload the combo box B with the related records, vi versa etc.........
can you also tell which is the quicker way for the data to return faster then what its doing, I am using linq to pull from from the database.
I am using similiar below, and its slow, the database only have three records at the moment. Any suggestions.
example:
IF ComboBox A is selected first then do this below
{
var List = from l in colorTableAdapter.GetData
where l.ColorSerialNumber == ComboBoxA.Text
select l,
ComboBoxB.Datasource = List.Select( t => t.ColorPartNo).ToList();
}
ELSE
{
var List = from l in colorTableAdapter.GetData
where l.ColorPartNumber == ComboBoxB.Text
select l,
ComboBoxA.Datasource = List.Select( t => t.ColorSerialNo).ToList();
}