Click here to Skip to main content
15,905,323 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I upload image in ms Access database this way

VB
Try
          If (con.State = ConnectionState.Closed) Then
              con.Open()
          End If
          Dim cmd As New OleDbCommand("insert into FileUpload(Sub_Cid,Subject,FileUpload)Values(" & CmboSubCategory.SelectedValue & ",@Subject,@image)", con)
          cmd.Parameters.AddWithValue("@Subject", Convert.ToString(TxtSubject.Text))
          cmd.Parameters.AddWithValue("@image", txtFileUploadPath.Text)
          cmd.ExecuteNonQuery()
          MessageBox.Show("file Upload")
          con.Close()
      Catch ex As Exception
          MessageBox.Show(ex.ToString())
      End Try


i see the database and image save in long binary data form

how to get the image in database and option download
Posted
Updated 18-Jun-13 3:41am
v2

1 solution

Refer:
Save and Retrieve Image From Database[^]

..and more similar threads here[^]
 
Share this answer
 
Comments
Kulwinder Bhardwaj 18-Jun-13 10:07am    
i am mot clear
i insert the image in database but i insert the image in folder ,both

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900