good pm.,.,i have a next button


Try

         lblcat.Text = ds.Tables("evaluation").Rows(cat)("QuestionCategory")

         txt1.Text = ds.Tables("evaluation").Rows(CurrentRow)("Question")

         txt2.Text = ds.Tables("evaluation").Rows(CurrentRow + 1)("Question")

         txt3.Text = ds.Tables("evaluation").Rows(CurrentRow + 2)("Question")

         txt4.Text = ds.Tables("evaluation").Rows(CurrentRow + 3)("Question")

         txt5.Text = ds.Tables("evaluation").Rows(CurrentRow + 4)("Question")



     Catch ex As Exception

     End Try

every click to the next button my category and questions change.,.,
every click i want also to save in my database

Private Sub Save_commit()

     Dim con As New OleDbConnection
     Dim cmd As New OleDbCommand
     Dim sSQL As String = String.Empty

     Try
         'get connection string declared in the Module1.vb and assing it to conn variable
         con = New OleDbConnection(Get_Constring)

         con.Open()

         cmd.Connection = con

         cmd.CommandType = CommandType.Text

         'I just use the textbox tag property to idetify if the data is new or existing.

         sSQL = "INSERT INTO evaluationresult ([Com])" & _
                 "  VALUES (?)"

         cmd.CommandText = sSQL
      cmd.Parameters.AddWithValue("@FacultyID", txtresult.Text)

         'cmd.Parameters.AddWithValue("@IDNumber", OleDbType.Numeric).Value

         'cmd.Parameters.AddWithValue("@Com", OleDbType.Numeric).Value

         ' cmd.Parameters.AddWithValue("@Know", OleDbType.Numeric).Value

         'cmd.Parameters.AddWithValue("@Teaching", OleDbType.Numeric).Value

         'cmd.Parameters.Addwithvallue("@man", OleDbType.Numeric).Value()


   'cmd.Parameters.AddWithValue("@ID", OleDbType.Numeric).Value

       cmd.ExecuteNonQuery()

     Catch ex As Exception

         MsgBox(ErrorToString)

     Finally
    con.Close()

     End Try

 End Sub

please improve

I am sorry to sound harsh, but what are we supposed to be improving?

What part of your code are you having a problem with?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.