ACC1x: GetChunk on ODBC Table Returns "Invalid Argument"

Last reviewed: June 8, 1997
Article ID: Q109403
The information in this article applies to:
  • Microsoft Access versions 1.0, 1.1

SYMPTOMS

When you call the GetChunk method against a SQL Server or other ODBC table, Microsoft Access returns the error message: "Invalid Argument."

CAUSE

Microsoft Access does not properly support the GetChunk method against ODBC tables.

STATUS

Microsoft has confirmed this to be a problem in Microsoft Access versions 1.0 and 1.1. This problem no longer occurs in Microsoft Access version 2.0.

MORE INFORMATION

Steps to Reproduce Problem

  1. Create a SQL Server table called SQLTest with a field called FldImage that has an image data type. Create a unique index on the table.

  2. Start Microsoft Access and open the sample database NWIND.MDB.

  3. Attach the SQLTest SQL Server table. The table name will be displayed as dbo.SQLTest, and will change to dbo_SQLTest after you attach it.

  4. From Microsoft Access, add one record to the table.

  5. Create a new module and enter the following sample code:

          Sub TestGetChunk()
             Dim MyDB As Database, MyDyna As Dynaset, s As String
    
             Set MyDB = CurrentDB()
             Set MyDyna = MyDB.CreateDynaset("dbo_SQLTest")
             s = MyDyna![FldImage].GetChunk(0, 10)
             MyDyna.Close
             MyDB.Close
          End Sub
    
    

  6. Type the following in the module's Immediate window:

          TestGetChunk
    

Microsoft Access will halt the procedure on the GetChunk line, and will display the error message stated above.


Keywords : kbprg OdbcOthr PgmObj
Version : 1.0 1.1
Platform : WINDOWS
Hardware : X86
Issue type : kbbug
Resolution Type : kbfix


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: June 8, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.