Fog Creek Software
Discussion Board

Knowledge Base
Terry's Tips
Darren's Tips

Where's the Article in MSAccess?

Out of curiousity and a desire to see if I could simply publish a CityDesk website as a MSAccess report...I pulled up the sample site into Access.  I couldn't find the main text of each article.  Is it hidden or am I missing something?  Am I not supposed to see it?

Using Home Version.


Guy Bjerke
Tuesday, February 12, 2002

It's an OLE blob.  tblArticles - oleArticle.

If you look at the design mode in the tables you should see the comments which explain what things are.

If you want to convert an OLE blob into a string in VB, you can do it like so

Public Declare Sub CopyMemoryStr Lib "kernel32" Alias "RtlMoveMemory" (Destination As Any, Source As String, ByVal Length As Long)

Public Function GetStringFromOleField(ole As DAO.Field) As String
GetStringFromOleField = ""
If ole.FieldSize = 0 Then Exit Function
Dim bytes() As Byte
bytes() = ole.GetChunk(0, ole.FieldSize)
GetStringFromOleField = Space$(ole.FieldSize)
CopyMemoryToStr GetStringFromOleField, bytes(0), ole.FieldSize

End Function

Michael H. Pryor
Tuesday, February 12, 2002

Thanks, Michael.  I saw the OLE and thought it was the article body.  I appreciate the code - but it's beyond my current capabilities.  Technology is pulling me in so many directions at once...I'll have to noodle with this later.

Keep up the great work!

Guy Bjerke
Tuesday, February 12, 2002

*  Recent Topics

*  Fog Creek Home