AnsweredAssumed Answered

Misbehaviour on using JDBC or ODBC

Question asked by oliver on Aug 5, 2012
Latest reply on Aug 6, 2012 by oliver

Summary

Misbehaviour on using JDBC or ODBC

Product

FileMaker Server

Version

11

Operating system version

Windows 2003

Description of the issue

Firstly, we are trying to use the JDBC/ODBC driver to connect the FileMaker Server (FMS) in order to access the container field.

From documentation, the GetAs function is required. In reality, we can never make it work strictly from JDBC. The application server we are using here is ColdFusion.

ODBC driver looks okay to retrieve container field's content but only limited to JPEG file or PDF with single image or scanned content in.

Have tried both GetAs(File, 'FILE') and GetAs(File, 'PDF '), same result.

It only work for JPEG type, even for PDF file as well.
GetAs(File, 'JPEG') or GetAs(File, 'PDF ') will work if the content is JPEG image or PDF with scanned image or pic file in. The behavior is strange and PDF file content are expected to return.

We can never make this work in JDBC driver.

Steps to reproduce the problem


select LastName, FirstName, GetAs(File, 'PDF ') as pic from artists where ArtistID = #URL.ID#


Is Binary : #isbinary(pic)#

Is Simple Value : #issimplevalue(pic)#

Is Array : #isarray(pic)#

#tobase64(pic)#


Expected result

bio data form.pdf
Is Binary : YES
Is Simple Value : NO
Is Array : YES

*** (follow with the pdf file streamed to the browser) ***

Actual result

bio data form.pdf
Is Binary : NO
Is Simple Value : YES
Is Array : NO

*** (follow with the pdf file streamed to the browser) ***

Exact text of any error message(s) that appear

java.lang.String is not a supported variable type. The variable is expected to contain binary data.

Outcomes