Results 1 to 7 of 7

Thread: ADODB.Recordset help

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jun 2001
    Posts
    98

    ADODB.Recordset help

    hello, i was wondering if it was possible to set a field to a specific Word Document from VB using an ADODB recordset. it can be done "manually" using just Access, but i am creating an app that needs to do this behind the scenes.

    thanks in advance for any help,
    PJ

  2. #2
    PowerPoster Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390
    you should be able to do just about anything in VB that you can in access.

    Record a macro of it...then post the macro code.
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jun 2001
    Posts
    98
    is it possible to record a macro in access though like in word? i can't seem to figure it out. thanks, PJ

  4. #4
    Joe_B
    Guest
    So are you just trying to embed a Word document into a database?

    If you are, then you could read the word document into a Stream Object and then write it to the field in the record desired through a recordset and update the recordset.

    For example:

    dim objStream as adodb.stream
    dim recset as adodb.recordset

    objstream.open
    objstream.type = adtypebinary
    objStream.LoadFromFile "c:\somefilename.doc"

    recset.fields("somefield") = objstream.read
    recset.update

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Jun 2001
    Posts
    98
    where is the stream function? i do not see it when i place the period after ADODB.

    thanks, PJ

  6. #6
    Joe_B
    Guest
    You would need to download the ADO 2.5 library(msado15.olb)

  7. #7
    spetnik
    Guest
    Originally posted by sub850
    where is the stream function? i do not see it when i place the period after ADODB.

    thanks, PJ
    Stream is an Object, not a Funtion

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width