hi everybody...
i'm trying to display images along with the image details stored in mysql database thru my webpage... the best i can do is display one image but no details ... i can retrieve all images as needed and store it someplace but i'm not able to display it
any kind of help will be appreciated...
this is the current code...
Dim con As New OdbcConnection(ConfigurationSettings.AppSettings(" ConnString"))
Dim da As New OdbcDataAdapter("select * from products", con)
Dim CmdB As New OdbcCommandBuilder(da)
Dim ds As New DataSet
Dim arr As Array
con.Open()
da.Fill(ds, "products")
Dim row As DataRow
row = ds.Tables("products").Rows(0)
Dim data() As Byte
Dim k As Long
Dim fs As FileStream
Dim strfilename As String
Response.Buffer = True
Response.ContentType = "image/jpeg"
For Each row In ds.Tables("products").Rows
arr = row.ItemArray
data = row("image")
strfilename = "\Shy\" & arr(0)
k = UBound(data)
fs = New FileStream(strfilename, FileMode.OpenOrCreate, FileAccess.Write)
fs.Write(data, 0, k)
Response.BinaryWrite(data)
Next
fs.Close()
fs = Nothing
CmdB = Nothing
ds = Nothing
da = Nothing
con.Close()