Reading and writing BLOB in ADO.NET
Often you may need to save user images in a database and then read back from a database when needed. For an example, we’ll save an author’s photo in a database so it can be read later to display in the author’s article. In this article, you will learn how to read and write BLOB data using ADO.NET.
The text of this article is not in this database — only its details are. The old site it was published on is gone, but the Internet Archive kept a copy: Reading and writing BLOB in ADO.NET
Join the conversation! Your thoughts help the community grow.
Sign in to leave a comment
It is the same account you read, post and publish with — and you will come straight back to this page.

pavan soniPosted Mar 17, 2009, 11:53 PM
df
simon yongPosted Sep 18, 2008, 3:04 AM
Sir, Can you tell me what is the function of this: adapter.MissingSchemaAction = MissingSchemaAction.AddWithKey
Boris AroeditedPosted Feb 7, 2007, 3:45 AMEdited Feb 12, 2007, 7:34 AM
Hello! I work with VS2005. I have an Access Table, that has OLE Object as a field. The object may be a pointer to jpg, doc or xml file. Just in case jpg file I need to show it, in other case open it. I did next (not full code): Dim ms AsNew MemoryStream() Dim reader As OleDbDataReader = cmd.ExecuteReader(CommandBehavior.SequentialAccess ) reader.Read() retval = reader.GetBytes(0, 0, outbyte, 0, bufferSize) ms.Write(outbyte, 0, retval) ms.Seek(0, SeekOrigin.Begin) curImage = Image.FromStream(ms,False)----> error "Parameter is not valid." I do not see the fault. Please help