Torna al Thread

Imports System.Data.SqlClient Partial Class Pag10 Inherits System.Web.UI.Page Dim strinx As String ' La stringa di connessione letta dal File Web.config Dim connxx As SqlConnection ' la connsssione derivante da strinx Dim cmdxxx As SqlCommand ' Il comando che sarà eseguito sulla connessione Protected Sub BtnExecute_Click(sender As Object, e As EventArgs) Handles BtnExecute.Click strinx = ConfigurationManager.ConnectionStrings("CSDFWFa").ConnectionString connxx = New SqlConnection(strinx) ' La stringa SQL di base UPDATE dbo.LA SET dbo.LA.LANote = 'nnn' WHERE dbo.LA.LAId = 37 cmdxxx = New SqlCommand("UPDATE LA SET LANote = '" + TextBoxNote.Text + "' WHERE LAId = " + TextBoxIdxx.Text + "", connxx) connxx.Open() cmdxxx.ExecuteNonQuery() connxx.Close() MsgBox("Fatto") End Sub End Class
Copyright © dotNetHell.it 2002-2025
Running on Windows Server 2008 R2 Standard, SQL Server 2012 & ASP.NET 3.5