I have to make an application which saves scores in database. Structure of database is NICK (string) that is primary key and PTS (int). If player has NICK, which already is available in database points he got in last game ought to be increase PTS akin to NICK. I've trouble editing DataSet after which upgrading database.

I have attempted to really make it as MSDN shows, however i do not have FindBy(...) method. I have spent a couple of days searching the solution and could not have it.

Here's code I authored:

private void dodajigrajbutton_Click(object sender, EventArgs e)
{
    nick = nicktextBox.Text;

    DataRow[] daneGracza = this.tFSDataSet.JIPP.Select("NICK = '" + nick + "'");
    DataTable table = new DataTable();
    table.Columns.Add("NICK", typeof(string));
    table.Columns.Add("PTS", typeof(int));

    try
    {
        int temp;

        tFSDataSet.AcceptChanges();
        if (!daneGracza[0].IsNull("NICK")) { }
        temp = (int)daneGracza[0].ItemArray[1];
        table.Rows.Add(nick, temp+points);  // there are good values here

        // here should be code editing row in data set, but i had unheld 
        //exceptions when trying to do it like 
        //daneGracza[0].ItemArray[1] = table.Rows[0];

        this.jIPPTableAdapter.Update(tFSDataSet);

    }
    catch (IndexOutOfRangeException ex)
    {
        this.jIPPTableAdapter.Insert(nick, points);
    }
    points = 0;
    this.jIPPTableAdapter.Fill(this.tFSDataSet.JIPP);
}

Unsure what the issue is, however i can answer why you do not have FindByXXX() techniques. They're produced by visual studio whenever you create typed datasets. More information you'll find here: