Click here to Skip to main content
14,028,405 members
Rate this:
Please Sign up or sign in to vote.
I try to insert image to MySQL database through C++, and using C++/CLI project to insert the images. Honestely I converted C# code to C++/CLI in order to insert the images. Unlikely I have error which can not be skipped. Could you please help me ?

byte[] imageBt = null; 
this sentence of code does not work in C++, How could I define or convert this code to C++? by other words how can someone define byte matrix in C++/CLI project?

What I have tried:

I tried to use
Byte[] imageBt = {0};
does not work
Updated 30-Jan-19 21:46pm

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Storing images in a data base is a bad idea because it gets slow and the data base inflates to much. You better store the image separated in some directory on server and store the name and path to it. Use some unique name for these images like created with some id.
Member 13967559 31-Jan-19 3:53am
Yea; I absolutely agree with you, I stored directroy and image path as string in SQL Databse, but I need to retrieve the images once I click on row or Search by ID. I need to display the images on picturebox. Any idea?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Cookies | Terms of Service
Web01 | 2.8.190419.4 | Last Updated 31 Jan 2019
Copyright © CodeProject, 1999-2019
All Rights Reserved.
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100