System.ArgumentException: 'Parameter is not valid.'
private void PageOverview_Load(object sender, EventArgs e) { loadYear(); configurationBLL = new ConfigurationBLL(); DataSet dataSet = configurationBLL.GetTotalUserCount(); label1.Text = dataSet.Tables[0].Rows[0][0].ToString(); label8.Text = dataSet.Tables[0].Rows[0][1].ToString(); label6.Text = dataSet.Tables[0].Rows[0][2].ToString(); DataSet dataSet1 = configurationBLL.GetTopVolunteer(); label31.Text = dataSet1.Tables[0].Rows[0][0].ToString(); label34.Text = dataSet1.Tables[0].Rows[1][0].ToString(); label36.Text = dataSet1.Tables[0].Rows[2][0].ToString(); byte[] Bimg = (byte[])dataSet1.Tables[0].Rows[0][2]; MemoryStream ms = new MemoryStream(Bimg); //Bitmap imgBTMP = (Bitmap)dataSet1.Tables[0].Rows[0][2]; //imgBTMP.Save(ms, System.Drawing.Imaging.ImageFormat.Jpeg); bunifuPictureBox6.Image = Image.FromStream(ms); }
Sql Server Code
USE [BiometricDB] GO /****** Object: StoredProcedure [dbo].[sp_GetTop3VolunteerReport] Script Date: 28/10/2022 13:07:01 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER PROCEDURE [dbo].[sp_GetTop3VolunteerReport] AS BEGIN -- Top 3 Volunteer Report SELECT TOP 3 v.[displayfullname] AS [Full Name], SUM(t.duration) AS [Total Duration], CAST(v.[profilephoto] as Varbinary) AS [Profile Photo] FROM tblattendancelog t INNER JOIN tblvolunteer v ON v.[volunteerid] = t.[volunteerid] WHERE t.[type] = 'Present' GROUP BY v.[volunteerid], v.[displayfullname], CAST(v.[profilephoto] as Varbinary) ORDER BY SUM(duration) DESC END
I Will Find whole google but can't find Help Me