Image file insertion into Database

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • shaiful
    New Member
    • Oct 2007
    • 89

    Image file insertion into Database

    Hi All,
    I tried a lot also followed many previous example, still i cant get proper idea that how to insert an image file into database? I using VB and Access. for example:
    My File image file is "C:\test\x.dwg" , I want to insert into table test(img, ID) . Please help me if u can, Thanks advance, Sam
  • debasisdas
    Recognized Expert Expert
    • Dec 2006
    • 8119

    #2
    You need to convert the file into byte stream and store in database file.

    Comment

    • debasisdas
      Recognized Expert Expert
      • Dec 2006
      • 8119

      #3
      Please find the details here.

      Comment

      • shaiful
        New Member
        • Oct 2007
        • 89

        #4
        Hello, thanks very much for ur valuable reply, However I cant understand which one is the image fime and which field of table will keep ? Sorry Just if more clear idea abt that, Thx

        Comment

        • QVeen72
          Recognized Expert Top Contributor
          • Oct 2006
          • 1445

          #5
          Hi,

          Check This Out

          The Code is for Oracle (Long Raw datatype)
          For Access, Field datatype is : OLE Data

          Regards
          Veena

          Comment

          • debasisdas
            Recognized Expert Expert
            • Dec 2006
            • 8119

            #6
            Originally posted by shaiful
            Hello, thanks very much for ur valuable reply, However I cant understand which one is the image fime and which field of table will keep ? Sorry Just if more clear idea abt that, Thx
            strFileNm is th ename of the file
            logo is the name of the field in database table.

            for oracle datatype should be lob or long raw
            for access datatype should be ole

            Comment

            Working...