You are currently viewing the BOOK: Beginning Visual Basic 2005 Databases ISBN: 978-0-7645-8894-5 section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.
I encounter a problem with inserting image into database.
I define a DataColumn in the dataset with byte data type "BL Component" & image data type in SP "Data Access Component" I convert the image to array of bytes and pass it to a dataset.
Code:
'objDataColumn = New DataColumn("Photo", Type.GetType("System.Byte"))
'objDataTable.Columns.Add(objDataColumn)
The problem is "cannot convert from byte() to byte"
Go to the Wrox web site and download the code for Visual Basic 2005 Instant Results. I wrote an entire application that does nothing but manages images in a SQL Server database. Perhaps that code can guide you in the right direction.
Let me know if there are any further questions or problems.