|
-
Jul 13th, 2001, 06:49 AM
#1
Thread Starter
Lively Member
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
-
Jul 13th, 2001, 07:11 AM
#2
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"
-
Jul 13th, 2001, 07:26 AM
#3
Thread Starter
Lively Member
is it possible to record a macro in access though like in word? i can't seem to figure it out. thanks, PJ
-
Jul 13th, 2001, 08:57 AM
#4
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
-
Jul 13th, 2001, 12:33 PM
#5
Thread Starter
Lively Member
where is the stream function? i do not see it when i place the period after ADODB.
thanks, PJ
-
Jul 13th, 2001, 01:01 PM
#6
You would need to download the ADO 2.5 library(msado15.olb)
-
Jul 13th, 2001, 01:03 PM
#7
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|