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. Visual Basic
  4. ole object in access database.........

ole object in access database.........

Scheduled Pinned Locked Moved Visual Basic
databasecom
2 Posts 2 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
    Nagraj Naik
    wrote on last edited by
    #1

    Hi All, I am using access database and vb 6.0 in my application. I want to store image/excel file for this purpose i decide to use OLE object datatype of access.But could not get sample code for my purpose. If anyone know any link please pass to me. Thanks, Nagraj

    N 1 Reply Last reply
    0
    • N Nagraj Naik

      Hi All, I am using access database and vb 6.0 in my application. I want to store image/excel file for this purpose i decide to use OLE object datatype of access.But could not get sample code for my purpose. If anyone know any link please pass to me. Thanks, Nagraj

      N Offline
      N Offline
      Nouvand
      wrote on last edited by
      #2

      It's been a long time since i stop using my vb6. Now i'm using vb2005. You can store many kind of file into your OLE object field. THe concept is: First, you need to read all bytes of your file and put it into an array of bytes. Last, then you can store this array into your OLE Object. Simple isn't it?:laugh: In VB2005 you can do this with a line of code: -------------------------------------------------------------- Imports System Import System.IO Class Streamer 'It will return array of bytes. Public Function GetByteArrayFromFile(ByVal FileName As String) As Byte() Return File.ReadAllBytes(FileName) End Function 'It will make the file form array of bytes. Public Sub MakeFileFormByteArray(ByVal FileName As String, ByVal ByteStream As Byte()) File.WriteAllBytes(FileName, ByteStream) End Sub End Class -------------------------------- You need to make the routine to retrieve and store the data by your own. I believe you can do that. If anyone can convert it to vb6? Plz Helo him Thanks before

      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