Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

イメージやその他のリソースは、サーバー・ルーチンからの応答として LOB 変数を渡すことで、ダウンロードできます。次の例では、BLOB を含む社員詳細が取り出され、物理ファイルのオブジェクト名として使用されます。ここに示されているインスタンスでは、イメージはデータベースに BLOB として格納されているので、応答の ContentFile プロパティに BLOB のファイル名が設定されています。
 

     SrvRoutine Name(DownloadImage) Response(#Response) 
Field_Map For(*Input) Field(#xEmployeeIdentification)

...

  

Fetch Fields(#xEmployeeSurname #xEmployeeGivenNames) From_File(xEmployee) With_Key(#xEmployeeIdentification)

...


If_Status Is(*okay)

...


Fetch Fields(#xEmployeeImage) From_File(xEmployeeImages) With_Key(#xEmployeeIdentification)

...


If_Status Is(*okay)

...

  

#Response.ContentFile := #xEmployeeImage.Filename

...

     #Response.AttachmentFileName := #xEmployeeSurname +#xEmployeeGivenNames + #xEmployeeIdentification + ".jpg"

...

  Endif

  Endif

...

  

Endif

Endif

Endroutine