Reputation: 2333
I have pictures of each employee stored 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
Upvotes: 1
Views: 501
Reputation: 3372
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.
Upvotes: 0
Reputation: 545628
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)
Upvotes: 1