Answers for "vbnet sql"

VBA
0

vbnet sql

Private Sub btnIncluirPagamento_Click(sender As Object, e As EventArgs) Handles btnIncluirPagamento.Click

        Dim valorPagamento As Double = Convert.ToDouble(txtValor.Text)

        Using context = New CadastroEntities()

            Dim sql As String = "insert into Pagamentos(valor, vendedor)" & vbCr & vbLf & "values (@valor, @vendedor)"

            Dim args = New DbParameter() {New SqlParameter() With {.ParameterName = "valor", .Value = valorPagamento},
                                          New SqlParameter() With {.ParameterName = "vendedor", .Value = txtVendedor.Text}}

            contador += context.Database.ExecuteSqlCommand(sql, args)
            lsbResultado.Items.Add("Comando SQL - Insert Into executado : " + contador.ToString())

        End Using

    End Sub
Posted by: Guest on June-28-2021

Code answers related to "vbnet sql"

Code answers related to "VBA"

Browse Popular Code Answers by Language