0
               cmdInsert.Parameters.Add(new OleDbParameter("@Student_Section", OleDbType.VarWChar, 50, "Student_Section"));
                    cmdInsert.Parameters.Add(new OleDbParameter("@Birth_Month", OleDbType.VarWChar, 50, "Birth_Month"));
                    cmdInsert.Parameters.Add(new OleDbParameter("@Birth_Date", OleDbType.VarWChar, 50, "Birth_Date"));
                    cmdInsert.Parameters.Add(new OleDbParameter("@Birth_Year", OleDbType.VarWChar, 50, "Birth_Year"));
                    cmdInsert.Parameters.Add(new OleDbParameter("@Gender", OleDbType.VarWChar, 50, "Gender"));
                    cmdInsert.Parameters.Add(new OleDbParameter("@Picture", OleDbType.Binary,50, "Picture")); //<<----//I do not know the proper format of saving..
                    cmdInsert.Parameters.Add(new OleDbParameter("@Teacher", OleDbType.VarWChar, 50, "Teacher"));
2
Contributors
4
Replies
22
Views
2 Years
Discussion Span
Last Post by Ketsuekiame
Featured Replies
  • If you have an image in code then you should be able to get the byte array out of the object that contains the data. It might be called `GetBytes()` or something. In any case, look for a method which will give you a byte array. I also noticed that … Read More

1

If you have an image in code then you should be able to get the byte array out of the object that contains the data. It might be called GetBytes() or something. In any case, look for a method which will give you a byte array.

I also noticed that you specified a length of 50 bytes. That's not going to be enough to store a decently sized image. Try 2Mb instead. That will let you have a JPEG of decent size.

To store, you pass the byte array of the image data as the Value of that parameter.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.