开发者

Create a jpeg file in c:\imagesFolder based on the Image stored in the database in vb.net

开发者 https://www.devze.com 2022-12-12 03:49 出处:网络
I have pictures of each employee s开发者_C百科tored in SQL database with Image database. Select pic from empimages where emp_ID=10

I have pictures of each employee s开发者_C百科tored in SQL database with Image database.

Select pic from empimages where emp_ID=10

give the picture of that employee in binary format.

How do I create a physical jpeg in C:\images folder based on the above query in vb.net.

Thanks


In what format do you have the file? As a byte array? In that case, simply write

My.Computer.FileSystem.WriteAllBytes( _
    "C:\images\" & imagename & ".jpg", ImageData, False)


Here is a good tutorial relating to this: Creating Binary Files using Visual Basic

You should be able to just take the data from the blob and write it to a file this way. Hope it helps.

0

精彩评论

暂无评论...
验证码 换一张
取 消