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. C / C++ / MFC
  4. insert binary file in image column in MS-SQL database

insert binary file in image column in MS-SQL database

Scheduled Pinned Locked Moved C / C++ / MFC
databasec++sql-serversysadminquestion
4 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.
  • N Offline
    N Offline
    neilsolent
    wrote on last edited by
    #1

    I need to insert the binary data from a local file into an image column in a SQL server 2000 database table. Is there a simple procedure for this, in C++ ?

    cheers, Neil

    D C 2 Replies Last reply
    0
    • N neilsolent

      I need to insert the binary data from a local file into an image column in a SQL server 2000 database table. Is there a simple procedure for this, in C++ ?

      cheers, Neil

      D Offline
      D Offline
      David Crow
      wrote on last edited by
      #2

      See here and here.


      "Approved Workmen Are Not Ashamed" - 2 Timothy 2:15

      "Judge not by the eye but by the heart." - Native American Proverb

      1 Reply Last reply
      0
      • N neilsolent

        I need to insert the binary data from a local file into an image column in a SQL server 2000 database table. Is there a simple procedure for this, in C++ ?

        cheers, Neil

        C Offline
        C Offline
        Cristian Amarie
        wrote on last edited by
        #3

        C++ is not much of a help itself. More likely is a DB API you may prefer (or mandatory to use...). OLEDB is probably the best (and hard sometimes) way for C++.

        N 1 Reply Last reply
        0
        • C Cristian Amarie

          C++ is not much of a help itself. More likely is a DB API you may prefer (or mandatory to use...). OLEDB is probably the best (and hard sometimes) way for C++.

          N Offline
          N Offline
          neilsolent
          wrote on last edited by
          #4

          Thanks to both of you for the replies. This seems to be quite tricky. I was looking at using SQLPutData(). There doesn't seem to be a T-SQL statement that does such an insert either..

          cheers, Neil

          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