Pro VB.NET 2002/2003For advanced Visual Basic coders working .NET version 2002/2003. Beginning-level questions will be redirected to other forums, including Beginning VB.NET.
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Pro VB.NET 2002/2003 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
The problem is not inserting it through the db but converting the file to bytes in vb so as to use the memorystream to get the bytes and them save it to the db.
example
Dim ms as memorystream
dim arr() as bytes = ms.GetBuffer
I donât follow. Files are stored in bytes. It seems you would be able to just read the file in binary format, and be done with it. I suppose if you want an intermediate storage, you could create an array of bytes, and read it into that.
Plus Rajesh seems to be indicating that SQL actully has an intrinsic column type designed to hold a file.