The following code inserts a new record in the sql server database. This is a windows application.
CODE
=====
Dim myconnection = New SqlConnection("server=TBS4F198\SQLEXPRESS; uid=rajan; pwd=jayraj; database=practice")
Dim mycommand = New SqlCommand("Insert into emp values ('Venkat', 25, 70000)", myconnection)
Dim myAdapter As SqlDataAdapter = New SqlDataAdapter
myAdapter.SelectCommand = myCommand
Dim Ds As DataSet = New DataSet
myConnection.Open()
myAdapter.Fill(Ds)
End Sub
It is working fine. What i need is a messagebox indicating "The employee Venkat is inserted". I mean to say the employee name should be indicated in the messagebox after the record is inserted successfully in the database. How to achieve this? I need the code for the messagebox
CODE
=====
Dim myconnection = New SqlConnection("server=TBS4F198\SQLEXPRESS; uid=rajan; pwd=jayraj; database=practice")
Dim mycommand = New SqlCommand("Insert into emp values ('Venkat', 25, 70000)", myconnection)
Dim myAdapter As SqlDataAdapter = New SqlDataAdapter
myAdapter.SelectCommand = myCommand
Dim Ds As DataSet = New DataSet
myConnection.Open()
myAdapter.Fill(Ds)
End Sub
It is working fine. What i need is a messagebox indicating "The employee Venkat is inserted". I mean to say the employee name should be indicated in the messagebox after the record is inserted successfully in the database. How to achieve this? I need the code for the messagebox