hi...

im not able to update data in vb.net....here is my code:

cmd = New SqlCommand("update tbl_Account_charts set AccountTypeid='" & cmbAccountType.Text & "',AccountNumber='" & TxtAccountNumber.Text & "',AccountName='" & txtaccountname.Text & "',Status='" & chbmark & "',UpdateDate='" & sys_date & "' where AccountTypeid=" & AccountID, con)
cmd.ExecuteNonQuery()

check if your query satisfies any condition.

where AccountTypeid=" & AccountID, con)
" ?

cmd = New SqlCommand("update [tbl_Account_charts] set AccountTypeid='" & cmbAccountType.Text & "',AccountNumber='" & TxtAccountNumber.Text & "',AccountName='" & txtaccountname.Text & "',Status='" & chbmark & "',UpdateDate='" & sys_date & "' where AccountTypeid='" & AccountID & "', con)
cmd.ExecuteNonQuery()

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.