SP Image/Attachments

Discussions related to Crystal Reports development.

Moderator: Lisa Ennis

Post Reply
cgriffin
Posts: 22
Joined: Mon Nov 17, 2014 6:14 pm

SP Image/Attachments

Post by cgriffin »

For pre 3.0 files, I am able to return data for attachments with the following:

SELECT O.Number, DI.Description, DI.FileType
FROM core.Blob cb
RIGHT JOIN pf.[Order] O ON o.Guid = cb.ID
JOIN dbo.DocumentImage DI ON DI.OrderID = O.Guid
WHERE O.Number = "I would place a pre 3.0 file number here."

However, for files created post 3.0, this same query does not return results.

Can you provide the post 3.0 query, please?
BobRichards
Posts: 1376
Joined: Wed Jan 15, 2014 3:50 pm
Location: Raleigh, NC
Contact:

Re: SP Image/Attachments

Post by BobRichards »

Attachments are retrieved using the Select API. They are not available in SQL.
Bob Richards, Senior Software Developer, SoftPro
cgriffin
Posts: 22
Joined: Mon Nov 17, 2014 6:14 pm

Re: SP Image/Attachments

Post by cgriffin »

Good afternoon Bob,

Just to clarify, we are not looking for the attachments themselves, just the Name, Description, Type, Source, Size, Last Modified on, Last Modified by, or at the very least just the description of the attachment. Therefore, we are only looking to retrieve the metadata. Please see screenshot attached.

Thank you,
Colin.
BobRichards
Posts: 1376
Joined: Wed Jan 15, 2014 3:50 pm
Location: Raleigh, NC
Contact:

Re: SP Image/Attachments

Post by BobRichards »

This information is not available from the SQL tables. You must open the order and query the associated API for a list of attachments.
Bob Richards, Senior Software Developer, SoftPro
Post Reply