Click here to Skip to main content
15,888,579 members
Home / Discussions / C#
   

C#

 
AnswerRe: Reference to array element Pin
OriginalGriff31-Dec-14 23:56
mveOriginalGriff31-Dec-14 23:56 
GeneralRe: Reference to array element Pin
BillWoodruff1-Jan-15 4:24
professionalBillWoodruff1-Jan-15 4:24 
GeneralRe: Reference to array element Pin
OriginalGriff1-Jan-15 4:34
mveOriginalGriff1-Jan-15 4:34 
GeneralRe: Reference to array element Pin
harold aptroot1-Jan-15 4:44
harold aptroot1-Jan-15 4:44 
GeneralRe: Reference to array element Pin
Krishnakumartg26-Jan-15 18:52
Krishnakumartg26-Jan-15 18:52 
Question[Solved]C# Database Image Manager Pin
rattlerrFx31-Dec-14 10:44
rattlerrFx31-Dec-14 10:44 
AnswerRe: C# Database Image Manager Pin
Richard Andrew x6431-Dec-14 11:13
professionalRichard Andrew x6431-Dec-14 11:13 
GeneralRe: C# Database Image Manager Pin
rattlerrFx31-Dec-14 11:25
rattlerrFx31-Dec-14 11:25 
That's the whole problem the code doesn't produce an error or warnings during Debug or compilation just at Run time the error message pops up in a Message Box. The program is suppose to read the folder and load the image into the Image Picture Box nor will it upload the image to the database. The image column just shows 0x0000000 that is because none of the images are being loaded into the Image column for the table.

It will put information into the other columns just not the image, I cannot figure out if it is a permissions issue. Now when i select a different ImageID from the dropdown box the error will repeat itself here is the code below.

C#
private void imageIDComboBox_SelectedIndexChanged(
           object sender, EventArgs e)
       {
           try
           {
               int imageID = Convert.ToInt32(imageIDComboBox.Text);

               // read image bytes from the database and display in picture box
               Byte[] imageByteArray = ProductDB.ReadImage(imageID);
               MemoryStream ms = new MemoryStream(imageByteArray);
               imagePictureBox.Image = System.Drawing.Image.FromStream(ms);
               ms.Close();
           }
           catch (Exception ex)
           {
               MessageBox.Show(this, ex.Message, "Error");
           }
       }


modified 31-Dec-14 17:34pm.

AnswerRe: C# Database Image Manager Pin
Richard Andrew x6431-Dec-14 11:27
professionalRichard Andrew x6431-Dec-14 11:27 
GeneralRe: C# Database Image Manager Pin
rattlerrFx31-Dec-14 11:36
rattlerrFx31-Dec-14 11:36 
AnswerRe: C# Database Image Manager Pin
Richard Andrew x6431-Dec-14 11:39
professionalRichard Andrew x6431-Dec-14 11:39 
GeneralRe: C# Database Image Manager Pin
rattlerrFx31-Dec-14 11:45
rattlerrFx31-Dec-14 11:45 
AnswerRe: C# Database Image Manager Pin
Richard Andrew x6431-Dec-14 12:00
professionalRichard Andrew x6431-Dec-14 12:00 
GeneralRe: C# Database Image Manager Pin
rattlerrFx31-Dec-14 12:08
rattlerrFx31-Dec-14 12:08 
AnswerRe: C# Database Image Manager Pin
Richard Andrew x6431-Dec-14 12:11
professionalRichard Andrew x6431-Dec-14 12:11 
GeneralRe: C# Database Image Manager Pin
rattlerrFx31-Dec-14 12:20
rattlerrFx31-Dec-14 12:20 
GeneralRe: C# Database Image Manager Pin
Richard Andrew x6431-Dec-14 12:24
professionalRichard Andrew x6431-Dec-14 12:24 
GeneralRe: C# Database Image Manager Pin
rattlerrFx31-Dec-14 12:24
rattlerrFx31-Dec-14 12:24 
AnswerRe: C# Database Image Manager Pin
Richard Andrew x6431-Dec-14 12:27
professionalRichard Andrew x6431-Dec-14 12:27 
GeneralRe: C# Database Image Manager Pin
rattlerrFx31-Dec-14 12:29
rattlerrFx31-Dec-14 12:29 
GeneralRe: C# Database Image Manager Pin
rattlerrFx31-Dec-14 12:42
rattlerrFx31-Dec-14 12:42 
GeneralRe: C# Database Image Manager Pin
SledgeHammer0131-Dec-14 12:30
SledgeHammer0131-Dec-14 12:30 
GeneralRe: C# Database Image Manager Pin
rattlerrFx31-Dec-14 12:34
rattlerrFx31-Dec-14 12:34 
GeneralRe: C# Database Image Manager Pin
SledgeHammer0131-Dec-14 12:45
SledgeHammer0131-Dec-14 12:45 
GeneralRe: C# Database Image Manager Pin
rattlerrFx31-Dec-14 12:55
rattlerrFx31-Dec-14 12:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.