-
In SQL Server, Northwind database, Categories table has a column "Picture", that column type is image. I think that all picture is update into data by binary type.
But I don't know how to display that data into a real picture in VB form, And I also can't update a picture into database when I choose a picture from my application.
Hope to hear from you soon.
-
Thats b'cauz they are storing it as OLE...
-
Sorry....I forgot to tell u onething...if u want I can send u the code
-
Once again sorry...to display the data u don't need any code...just put an OLE control and link it with the datacontrol ...This should work for writing back to the field also. If u want to do this through a code then it's little difficult
-
If you don't mind, please send me your code.
Thanks.
-
Put a pictureox on your form and link it to your database and field picture...
It will display the picture when it's bound to the control...
Gerco.
-
I don't think it works Gerco...Have u tried it? It works with access but I doubt with SQL Server ? Do u think it works?
-
I agree with Faisalkm. The Gerco's idea doesn't work with SQL Server. The message error is can not bound picture to database.
-
It won't work with SQL server, you're right about that... didn't know at first..
It works fine with access... :-(
Perhaps export the binairy data to an array or a file and cast it to a StdPicture or something?
Gerco.
-
It will work if u use an OLE control....
-
Hey Gerco, do you know how to cast it to a StdPicture. For instance, .gif file
-
The problem is that they are storing it as an OLE object and not as an image. There may be some headers or something that identifies this OLE object. Microsoft uses some HexaDecimal values when they first write data in to this field. But I don't think u can't cast it to Stdpicture