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

pavan soniPosted Mar 17, 2009, 7:53 PM EDT
df
simon yongPosted Sep 17, 2008, 11:04 PM EDT
Sir, Can you tell me what is the function of this: adapter.MissingSchemaAction = MissingSchemaAction.AddWithKey
Boris AroeditedPosted Feb 6, 2007, 10:45 PM ESTEdited Feb 12, 2007, 2:34 AM EST
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