Torna al Thread

Dim MyConnection As New SqlConnection(WebConfigurationManager.ConnectionStrings("ConnectionString").ConnectionString) Dim sqlAd1 As New SqlClient.SqlDataAdapter("SELECT Codfisc, Dal, Al FROM Ferie where codfisc = '" & HiddenField1.Value & "' and ('" & TextBox1.Text & "' between dal and al ) and ('" & TextBox2.Text & "' between dal and al)", MyConnection) Dim dv As New DataView ' creo il dataset con i dati del data adapter Dim Ds1 As New DataSet sqlAd1.Fill(Ds1, "Ferie") dv.Table = Ds1.Tables("Ferie") ' popolo il dataset ' associo il data set alla gridview GridView2.DataSource = dv dv.RowFilter = "Codfisc = '" & HiddenField1.Value & "'" GridView2.DataBind()
Copyright © dotNetHell.it 2002-2024
Running on Windows Server 2008 R2 Standard, SQL Server 2012 & ASP.NET 3.5