blog

Home / DeveloperSection / Blogs / i want to display images into to datagridview one by one taking image url from database field

i want to display images into to datagridview one by one taking image url from database field

priya R9210 03-Aug-2011
Dim di As New IO.DirectoryInfo("C:\Inetpub\wwwroot\images")
Dim aryFi As IO.FileInfo() = di.GetFiles("*.JPG")
For Each fi In aryFi
Dim imagname As String = fi.Name
Dim path As String = "http:\\192.168.52.36\images\" & fi.Name
Try
con.Open()
Dim sqlquery As String = "insert into tbl_images values('" & imagname & "','" & path & "')"
Dim sqlcommand As New SqlCommand(sqlquery, con)
sqlcommand.ExecuteNonQuery()
con.Close()
Catch ex As Exception
MsgBox(ex.ToString)
End Try
Next
by this way i am saving images path in database....... like http:\\192.168.52.36\images\img1.jpg.. now i want to display the images in to a control like datagridview taking the images path from database... this is window based appplication..... plz any idea to go forward.. help me out.....

thanks
priya...

Updated 18-Sep-2014

Leave Comment

Comments

Liked By