query in Updating a row in the database

srivalli

Well-known member
Joined
May 4, 2005
Messages
189
Programming Experience
Beginner
for deleting a particular row in the database, by giving a number as inout
the code i wrote is

dim i
Try

Dim ss As String = "delete transdett where no=@bgno"

cmd =
New SqlCommand(ss, cn)

cmd.Parameters.Add("@no", textbox2.text)

cn.Open()

i = cmd.ExecuteNonQuery

cn.Close()

Label9.Text = i & " records deleted ! "

Catch x As Exception

MsgBox(x.Message)

End Try


can i know the alterations for updating a row in the dbase.
 
use this sql - ammend it to what your table has
VB.NET:
UPDATE	Customer
SET Firstname = @Firstname, Lastname = @Lastname, DateofBirth = @Dateofbirth, Street = @Street, City = @City, County = @County, Postcode = @Postcode
 
Back
Top