Re: Storing/Retrieving BLOB Data directly into a PictureBox in VB.NET
Posted by: Subu Mysore
Date: January 28, 2009 04:50PM

I am getting an error...Data too long for column. I am trying the following code
fs = New FileStream(strImgName, _
FileMode.Open, FileAccess.Read)
FileSize = fs.Length

rawData = New Byte(FileSize) {}
fs.Read(rawData, 0, FileSize)
fs.Close()
CONN.Open()
cmd.Connection = CONN
cmd.CommandText = "prc_AddUpdateImage"
cmd.CommandType = CommandType.StoredProcedure
cmd.Parameters.AddWithValue("pID", Nothing)
cmd.Parameters.AddWithValue("pImageID", clsImageID)
cmd.Parameters.AddWithValue("pFileName", "NewImageName")
cmd.Parameters.AddWithValue("pFileExt", "jpg")
cmd.Parameters.AddWithValue("pImageContent", rawData)
cmd.ExecuteNonQuery()
CONN.Close()

Using vb.net 3.5, .NET Connector 5.2.2.0, Image Size= 300kb, Column = LONGBLOB and charset=Latin1

Please help

Options: ReplyQuote


Subject
Written By
Posted
Re: Storing/Retrieving BLOB Data directly into a PictureBox in VB.NET
January 28, 2009 04:50PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.