Guest User

Guest User

  • Tech Writer
  • 529
  • 41.9k

I got this error when i call image fix it please

Nov 9 2022 11:08 PM
  Name Value Type
? ReadTimeout 'ms.ReadTimeout' threw an exception of type 'System.InvalidOperationException' int {System.InvalidOperationException}
  Name Value Type
? WriteTimeout 'ms.WriteTimeout' threw an exception of type 'System.InvalidOperationException' int {System.InvalidOperationException}
if(dataSet1.Tables[0].Rows.Count > 0)
            {
                //bunifuPictureBox6.Image = null;
                if(dataSet1.Tables[0].Rows[0][2] != System.DBNull.Value)
                {
                    photo_aray = (byte[])dataSet1.Tables[0].Rows[0][2];
                    MemoryStream ms = new MemoryStream(photo_aray);

                    bunifuPictureBox6.Image = Image.FromStream(ms);
                    bunifuPictureBox6.SizeMode = PictureBoxSizeMode.StretchImage;

                }
            }
C#


Answers (9)

4
Guest User

Guest User

  • Tech Writer
  • 529
  • 41.9k
Nov 12 2022 6:04 AM

RAJANIKANT HAWALDAR

Can u help on Anydesk

4
Guest User

Guest User

  • Tech Writer
  • 529
  • 41.9k
Nov 12 2022 6:03 AM

i will try all method please help me

4
Rajanikant Hawaldar

Rajanikant Hawaldar

  • 31
  • 38.8k
  • 435.4k
Nov 11 2022 5:48 AM

https://www.c-sharpcorner.com/UploadFile/e628d9/inserting-retrieving-images-from-sql-server-database-without-using-stored-procedures/

4
Guest User

Guest User

  • Tech Writer
  • 529
  • 41.9k
Nov 11 2022 12:10 AM

Attachment: Desktop.rar

I Will Upload Image where i call data Check Desktop.zip File

USE [BiometricDB]
GO
/****** Object:  StoredProcedure [dbo].[sp_GetTop3VolunteerReport]    Script Date: 11/11/2022 05:08:39 ******/
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

 

4
Guest User

Guest User

  • Tech Writer
  • 529
  • 41.9k
Nov 10 2022 2:46 PM

How to use tell me 

 

I will try but same error

4
Guest User

Guest User

  • Tech Writer
  • 529
  • 41.9k
Nov 10 2022 2:20 PM

can u send me full code

 

4
Rajanikant Hawaldar

Rajanikant Hawaldar

  • 31
  • 38.8k
  • 435.4k
Nov 10 2022 1:07 PM
bunifuPictureBox6.Invoke(new MethodInvoker(
        delegate()
        {
          bunifuPictureBox6.Image = Image.FromStream(ms);
          bunifuPictureBox6.SizeMode = PictureBoxSizeMode.StretchImage;
        }));

 

4
Guest User

Guest User

  • Tech Writer
  • 529
  • 41.9k
Nov 10 2022 11:24 AM

Can u send me code or post link

 

4
Rajanikant Hawaldar

Rajanikant Hawaldar

  • 31
  • 38.8k
  • 435.4k
Nov 10 2022 5:57 AM

Use UI thread to set image