Reputation: 87
I have a windows form application who using MSSQL Database.
When I'm trying to access one of the tableAdapters, I can't access the GetBy
and FillBy
methods, as seen there: https://i.sstatic.net/QOcmf.jpg
While the GetBy
and FillBy
methods are already created: https://i.sstatic.net/P8kDu.png
What is the problem? Why don't I have access to the GetBy
and FillBy
methods?
Btn_click:
private void button_login_Click(object sender, EventArgs e)
{
pictureBox_login_loading.Visible = true;
moveControlX(button_login, 50, Direction.Left); // move left for progress bar
moveControlX(button_login, 50, Direction.Right); // return button to place.
}
Upvotes: 0
Views: 142
Reputation: 5119
You need to 'new' it up.
public void button_login_Click(object sender, EventArgs e)
{
ReadersTableAdapter rdrsTblAdapter = new ReadersTableAdapter();
rdrsTblAdapter.GetBy();
rdrsTblAdapter.FilBy();
}
Upvotes: 1