i wrote the code for storing records to the dbase as follows:
dim da as new sqldataadapter("select * from bankdet",cn)
Try
cn.Open()
str = "insert into bankdet values (' " & TextBox1.Text.Trim & " ','" & TextBox3.Text.Trim & " ',' " & TextBox2.Text & " ') "
str1 = str.ToUpper.Trim(str)
cmd = New SqlCommand(str1, cn)
cmd.ExecuteNonQuery()
MsgBox(" UR RECORD IS SAVED")
Catch ex As SqlClient.SqlException
MessageBox.Show("BANK ALREADY EXISTS ")
Me.TextBox1.Focus()
TextBox1.Text = " "
TextBox3.Text = " "
End Try
cn.Close()
// here textbox2 is autoincrement field.
after saving the data to the backend,
i want to modify the entered data .
what r the changes required.
dim da as new sqldataadapter("select * from bankdet",cn)
Try
cn.Open()
str = "insert into bankdet values (' " & TextBox1.Text.Trim & " ','" & TextBox3.Text.Trim & " ',' " & TextBox2.Text & " ') "
str1 = str.ToUpper.Trim(str)
cmd = New SqlCommand(str1, cn)
cmd.ExecuteNonQuery()
MsgBox(" UR RECORD IS SAVED")
Catch ex As SqlClient.SqlException
MessageBox.Show("BANK ALREADY EXISTS ")
Me.TextBox1.Focus()
TextBox1.Text = " "
TextBox3.Text = " "
End Try
cn.Close()
// here textbox2 is autoincrement field.
after saving the data to the backend,
i want to modify the entered data .
what r the changes required.