Torna al Thread

Try Connection.Open() Dim cmd As New MySqlCommand("Select stipendio_dettaglio.Mese As Ultimo_Mese," & _ "stipendio_dettaglio.Anno As Ultimo_Anno,T.Tot_Tfr" & _ " From stipendio_dettaglio Inner Join" & _ " (Select" & _ " Sum(stipendio_dettaglio.Tfr) As Tot_Tfr,stipendio_dettaglio.ID_Anagrafica" & _ " From stipendio_dettaglio" & _ " Group By stipendio_dettaglio.ID_Anagrafica) T On T.ID_Anagrafica =" & _ " stipendio_dettaglio.ID_Anagrafica" & _ " Where stipendio_dettaglio.ID_Anagrafica = " & m_ParametroID_Anagrafica & "" & _ " Group By stipendio_dettaglio.Mese,stipendio_dettaglio.Anno, T.Tot_Tfr" & _ " Order By stipendio_dettaglio.Anno,stipendio_dettaglio.Mese", Connection) Dim dr As MySqlDataReader = cmd.ExecuteReader If dr.Read() Then MsgBox(dr("Tot_Tfr")) MsgBox(dr("Ultimo_Mese") & " " & dr("Ultimo_Anno")) TextBox4.Text = (Format(CType(CDbl(dr("Tot_Tfr")), Decimal), "###,##0.00")) ' tfr TextBox5.Text = dr("Ultimo_Mese") & " " & dr("Ultimo_Anno") End If Catch ex As Exception End Try Connection.Close
Copyright © dotNetHell.it 2002-2024
Running on Windows Server 2008 R2 Standard, SQL Server 2012 & ASP.NET 3.5