none
ODBC/OLEDB failure accessing MS Access "Attachments" field in query RRS feed

  • Question

  •  

    We are experiencing failures when accessing a datatype="Attachments" field in a query in an MS Access 2007 database using ACE ODBC or OLEDB drivers.

     

    We are using an MS Access 2007 database
    ACE ODBC/OLEDB drivers installed (i.e. Office 2007, which installs these drivers)
    DB contains a table with a field of type "Attachments" (which is new in MS Access 2007)
    DB contains a query that selects the fields of the above table

    Using ACE ODBC or ACE OLEDB drivers to display the table works fine. The "Attachments" field is displayed as the file name of the attachment(s).

    However, using either ACE ODBC or ACE OLEDB to display the query (i.e. NOT the table) results in either incorrect results or unexpected failures of the ODBC/OLEDB drivers.

     

    Error using ODBC (using "ODBC Test"):

    =============================

    select * from Query1 does not give an error, but displays a "1" for the Attachment field.

    select Attachments from Query1 gives the following error:

                stmt:     szSqlState = "HY000", *pfNativeError = -3087, *pcbErrorMsg = 97,

    *ColumnNumber = -2, *RowNumber = -2

                            MessageText = "[Microsoft][ODBC Microsoft Access Driver] Reserved error (|);

    there is no message for this error."

     

    Error using OLEDB (using "RowSetViewer"):

    ================================

    select * from Query1 gives the following error:

                Interface: Unknown

                Result: 0x0004001 = E_NOTIMPL

                FormatMessage: “Not implemented

                File: F:\Depot\SQLVault\mdac28sdk\Samples\oledb\rowsetviewer\SDK\obj\i386\CRowset.cpp

                Line: 616

     

    select Attachments from Query1 gives the following error:

                Interface: IID_ICommand

                Result: 0x0004005 = E_FAIL

                IErrorInfo: [0x0000f3f1] “Unspecified error”

                File: F:\Depot\SQLVault\mdac28sdk\Samples\oledb\rowsetviewer\SDK\obj\i386\CCommand.cpp

                Line: 439

     

    If it would help to analyze the problem, I have a folder containing all pertinent files (bare-bone database, tools, instructions) to reproduce this. I could attach it as a ZIP file, if requested.

     

    Thanks,

     

    Joe

    Friday, March 14, 2008 7:44 PM