Update data in SQL database table

Pubblicato il: 24 novembre 2018
sul canale di: SUNDEEPGAMEIN
64
1

Try

con = New SqlConnection(cs)
con.Open()
Dim cb As String = "update Product set Productname = '" & txtProductName.Text & "',[HSNCode]= '" & cmbHSN.Text & "',Category = '" & cmbCategory.Text & "',[Tax]= '" & cmbTAX.Text & "',[Range]= '" & cmbRange.Text & "',[PCompany]= '" & cmbCompany.Text & "' where Productcode = '" & txtProductCode.Text & "'"
cmd = New SqlCommand(cb)
cmd.Connection = con
cmd.ExecuteReader()
MessageBox.Show("Successfully updated", "Product Details", MessageBoxButtons.OK, MessageBoxIcon.Information)

If con.State = ConnectionState.Open Then
con.Close()
End If

con.Close()



Catch ex As Exception
MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try

   • Insert/Save Data  to Database Table From V...  
this link for save/insert data in SQL database

   • Auto Fill Data in Combo box From Database ...  
this link for fatch data from SQL database in combo box

   • Auto generate Random Number for unique Pro...  
this link for Auto generate Random Number for unique ID

   • FONT AND COLOR CHNAGE IN DATAGRIDVIEW - VB...  
this link for FONT AND COLOR CHNAGE IN DATAGRIDVIEW


In questa pagina del sito puoi guardare il video online Update data in SQL database table della durata di ore minuti seconda in buona qualità , che l'utente ha caricato SUNDEEPGAMEIN 24 novembre 2018, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 64 volte e gli è piaciuto 1 spettatori. Buona visione!