
May 27th, 2005, 01:27 PM
|
|
Contributing User
|
|
Join Date: May 2004
Posts: 45
Time spent in forums: 1 h 24 m
Reputation Power: 5
|
|
|
Storing photos in the database
I've researched this to death and have found a way to accomplish storing photos in my firebird db, here's my code:
Code:
Do While FBReader.Read() Then
Dim FBArray(FBReader.GetBytes(1, 0, Nothing, 0, Integer.MaxValue) - 1) As Byte
FBReader.GetBytes(1, 0, FBArray, 0, FBArray.Length)
Dim DataStream As New System.IO.MemoryStream(FBArray)
If Not DataStream Is Nothing Then imgMain1.Image = System.Drawing.Image.FromStream(DataStream)
Loop
I'm trying to cut down the time it takes to load the photos (not related to earlier post of slow connection time). Would anyone know of a different way to load the photos and store them in the db?? Greatly appreciate the assist.
|