Hi All -
 
Our SQL DBA is looking for best practice advice on how to retrieve attachments 
in INC and CRQ records/work info entries.  On page 37 of the DB ref guide, it 
tells what table(s) to find the attachment images, which we have found. 
 
Goal:  To retrieve documentation files that are part of work info entries, and 
are in the ARS attachment data tables.  
 
Environment:  ARS 7.02 and SQL 2K8
 
Has anyone done this in the past ?  Do you have an example of the SQL statement 
?  The field element in the B/C tables indicates the attachments are "imaged" 
types.
 
Thanks in advance very much !
 
Rick
 
From page 37 of the guide:
 Chapter 1 Using relational databases with AR System 37Attachment details 
tableThe Attachment details table contains information for the properties of
Attachment fields. For every Attachment field in the form, a separate table is
created to store the attachment value.
The Attachment details table is named with a 
form (for example, 
labeled 
form.
For every attachment field added to any attachment pool on the form, three
columns are added. Each column is named with 
attachment field ID. For example, the three columns added for one attachment
might be called B followed by the unique ID for theB3). In Figure 1-1 on page 
26, the attachment details table isBn. An attachment details table with one 
column (C1) is created with everyC, CO, or CC, followed by theC536870920, 
CO536870920, and CC536870920, where 536870920is the attachment field ID.
The 
the original size (in bytes) of the attached file. The 
compressed size (in bytes) of the attachment file.C column stores the full path 
name of the attached file. The CO column storesCC column stores theAttachment 
data tableFor each attachment field on a form, an attachment data table is 
created. The
attachment data table is named with a 
followed by 
data table might be called B followed by the unique ID for the form,C, followed 
by the attachment field ID. For example, the attachmentB7C536870920, where 7 is 
the schemaID, and536870920 
table is labeled is the attachment field ID. In Figure 1-1 on page 26, the 
attachment dataBnCfID.The Attachment data table has two columns: one that holds 
the Request ID
(
is named with a 
column might be named entryId) and one that holds the data from the file. The 
column holding the dataC followed by the attachment field ID. For example, the 
dataC536870920, where 536870920 is the attachment field ID. 

_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
attend wwrug12 www.wwrug12.com ARSList: "Where the Answers Are"

Reply via email to