Hi guys. I got a form that i ask the user to input data on it and it write it in sql server db. 2 of the field data i want their sum does not exceed a perticuler value for example 5 . How i can apply such bussiness rules in to my database and input form(at the client side). I be happy if some one show how to do this
http://i5.photobucket.com/albums/y18...07/sumform.jpg ( form pic)
insert code:
Code:Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Dim MyCommand As SqlCommand Dim UpdateCmd As String = "Insert Into Matches Values(" & Me.TextBox1.Text & "," & Me.TextBox2.Text & "," & Me.LstPlayer.SelectedValue & "," & Me.TextBox4.Text & "," & Me.TextBox5.Text & ")" MyCommand = New SqlCommand(UpdateCmd, MyConnection) MyCommand.Connection.Open() MyCommand.ExecuteNonQuery() MyCommand.Connection.Close() Server.Transfer("Match.aspx") End Sub




Reply With Quote