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:\\\images\" & fi.Name
Dim sqlquery As String = "insert into tbl_images values('" & imagname & "','" & path & "')"
Dim sqlcommand As New SqlCommand(sqlquery, con)
Catch ex As Exception
End Try
by this way i am saving images path in database....... like http:\\\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.....

  Modified On Sep-18-2014 01:23:58 PM
  1. Hi Priya,

    First thing, This is not the perfact place to ask a question or discussing any topic. Here you can submit only blogs. If you want to ask any question then Please join mindstick forum at follwoing link


    From Here you can put appropriate type and then ask your question or you can start new topic or discussion.

    Answer of your question

    Here I am writing few steps which might be helpful for you while solving your problem.

    >>Create a SqlConnection object.

    >>Create a SqlDataAdapter object.

    >>Create a DataSet object.

    >>Fill records of table into DataSet.

    Now by doing these steps all the info comes in your dataset. Now you can easily bind information in DataGridView by making some changes.

    >>Make column of DataGridView of type Image in which you want to show image.

    >>Bind info of DataSet in DataGridView.

    You can take following link for help.




Leave Comment