Hi there,
I created a DB in SQL server 2005 and one of the columns is an image type. Then using the SQL Server Managment Studio I created an "Insert into" query to push a bunch of text into the text columns and an image (C:\img.jpg) into the image column. The Query appeared to execute and returned no errors, I then spent hours trying to create a VB.Net application that would read the image from the database using a standard SQL connection ("Select * from") , I finally seemed to crack it but all that was returned was "C:\img.jpg" ! Looks like I managed to store away the image path and name instead of the image, although the column does claim to contain <binary>, I suppose that could be used for a text string.
So I need help loading images into a Database, I can find lot's of C# examples, or examples using older versions of VB, but I would love to see how it should be done properly in vb.net code (I am new to it).
Any pointers gratefully received !
Thanks you
Judda
I created a DB in SQL server 2005 and one of the columns is an image type. Then using the SQL Server Managment Studio I created an "Insert into" query to push a bunch of text into the text columns and an image (C:\img.jpg) into the image column. The Query appeared to execute and returned no errors, I then spent hours trying to create a VB.Net application that would read the image from the database using a standard SQL connection ("Select * from") , I finally seemed to crack it but all that was returned was "C:\img.jpg" ! Looks like I managed to store away the image path and name instead of the image, although the column does claim to contain <binary>, I suppose that could be used for a text string.
So I need help loading images into a Database, I can find lot's of C# examples, or examples using older versions of VB, but I would love to see how it should be done properly in vb.net code (I am new to it).
Any pointers gratefully received !
Thanks you
Judda
Last edited: