E
E
evgeniy_matveev2019-10-17 09:26:39
C++ / C#
evgeniy_matveev, 2019-10-17 09:26:39

Why does the code stop executing after filling the dataset?

Good afternoon.

private void invoiceItemEditForm_Load(object sender, EventArgs e)
        {
            itemsBindingSource.Sort = "name ASC";  
            this.itemsTableAdapter.FillByWithProducerName(this.e926595l_skladDataSet.items);
            invoiceItemComboBox.SelectedValue = itemID;
            this.unitsTableAdapter.Fill(this.e926595l_skladDataSet.units);
            unitscomboBox.SelectedValue = unitID;
        }

After the line
this.itemsTableAdapter.FillByWithProducerName(this.e926595l_skladDataSet.items);

the code is not executed. No errors found. What could be the problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
shai_hulud, 2019-10-17
@shai_hulud

only two options:
1) wrap the entire block of this code directly in Try / Catch and put a breakpoint (or logs) on catch. The message will make it clear what happened.
2) Run with a debugger. Wait until it freezes. Press "Break All" aka pause. Select Debug -> Windows - Threads from the menu. In the Threads window, search and browse to find the one that hangs on the invoiceItemEditForm_Load and see what it does / waits for. Optionally, you can unpause, and click again and see if this thread has progressed. Maybe he does not wait, but does endless work.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question