Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Java
  4. Image Store in MySQL db

Image Store in MySQL db

Scheduled Pinned Locked Moved Java
databasemysqltutorialquestion
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    ayemyamya
    wrote on last edited by
    #1

    how to store .jpg type image in MySQL database?

    L S 2 Replies Last reply
    0
    • A ayemyamya

      how to store .jpg type image in MySQL database?

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Use one of the BLOB types.

      One of these days I'm going to think of a really clever signature.

      1 Reply Last reply
      0
      • A ayemyamya

        how to store .jpg type image in MySQL database?

        S Offline
        S Offline
        sakurahito
        wrote on last edited by
        #3

        in vb window

        Private Sub btnBrowse_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnBrowse.Click
        Dim OpenFileDialog1 As New OpenFileDialog
        With OpenFileDialog1
        .CheckFileExists = True
        .ShowReadOnly = False
        .Filter = "All Files|*.*|Bitmap Files (*)|*.bmp;*.gif;*.jpg"
        .FilterIndex = 2
        If .ShowDialog = Windows.Forms.DialogResult.OK Then
        ' Load the specified file into a PictureBox control.
        PhotoPictureBox.Image = Image.FromFile(.FileName)
        TextBox1.Text = OpenFileDialog1.FileName.ToString()
        End If
        End With
        End Sub

        in C# window

        private void btnBrowse_Click(object sender, EventArgs e)
        {
        if (customeropen.ShowDialog() == System.Windows.Forms.DialogResult.OK)
        {
        txtCustomerPhoto.Text = customeropen.FileName.ToString();
        pccustomerphotosample.Image = Image.FromFile(customeropen.FileName);
        }
        }

        :)

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups