Counter count to 10, end then 10,10,10,10,...at 1 to 9 is everithing is ok...
What is wrong
- SqlDataReader rdr;
- SqlCommand cmd = new SqlCommand();
- cmd.CommandText = "select max(brojprijavnice2) from dbo.prijava_radnika ";
- cmd.Connection = con;
- con.Open();
- rdr = cmd.ExecuteReader();
- int max = 0;
- while (rdr.Read())
- {
- max = Convert.ToInt32(rdr[0].ToString());
- Console.WriteLine(max);
- }
- con.Close();
- String updateStaff = "UPDATE [dbo].[prijava_radnika] SET [vrijemeodjave] = @vrijemeodjave, brojprijavnice2 = '" + (max+1) + "', [status] = 'odjavljen' WHERE radnik = '" + readerresultTextbox.Text + "' and [status] = 'prijavljen'";
Nitin SontakkePosted Mar 14, 2018, 10:08 PM
Goran BibicPosted Mar 14, 2018, 12:47 PM
Nitin SontakkePosted Mar 14, 2018, 12:11 PM
Goran BibicPosted Mar 14, 2018, 11:36 AM
Nitin Sontakke
Goran BibicPosted Mar 14, 2018, 11:18 AM
Goran BibicPosted Mar 14, 2018, 10:46 AM
Nitin SontakkePosted Mar 14, 2018, 9:57 AM