Microsoft KB Archive/109375

From BetaArchive Wiki

ACC1x: "Invalid Argument" Error Message Exporting Table

Q109375



The information in this article applies to:


  • Microsoft Access versions 1.0, 1.1





SYMPTOMS

The error message "Invalid argument" is displayed when you export a table from Microsoft Access with either the Word For Windows Merge or the "Text (Delimited") format.



CAUSE

The table you are exporting is an attached SQL table that contains a field with a Text data type, which is equivalent to a Microsoft Access Memo field.



RESOLUTION

To work around this problem you can:


  • Choose a different format to export to, such as dBASE.
  • Use a make-table query to copy the SQL table to a local Microsoft Access table, and then export the new table.
  • Export only fields from the SQL table that do not have a Text data type. To do this, create a select query that contains only fields that do not have a Text data type, then use the TransferText macro action to export the query results.



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

You can use the SQL Server sp_help stored procedure to determine which fields in the attached SQL Server table have a Text data type.

For example, for a SQL table called MyAddressList that contains a field called Notes that has a Text data type, the sample command


   sp_help MyAddressList 


would return a listing similar to:


   Name             Owner        Type
   ----------------------------------------
   MyAddressList    dbo          user table


   Column_name      Type         Length  Nulls
   -------------------------------------------
   EntryNumber      int          4
   Name             varchar      30
   ... other fields ...
   Notes            text         16 


Note that "text" appears in the Type column for the Notes field.

Steps to Reproduce Problem

NOTE: This article assumes that you are familiar with Microsoft SQL Server and the tools used to administer a Microsoft SQL Server database and tables.


  1. Use the following sample SQL statements to create a table called "MyAddressList" on the SQL Server:

          USE <A valid SQL database name here>
    
          CREATE TABLE MyAddressList
             (
             EntryNumber int null,
             Name varchar(30) null,
             Notes text null
             )
    
          CREATE UNIQUE NONCLUSTERED INDEX I_EntryNumber
          ON MyAddressList (EntryNumber) 
  2. Attach the MyAddressList table to a Microsoft Access database by choosing Attach from the File menu in Microsoft Access.
  3. Export the attached table with either the Word For Windows Merge or the "Text (Delimited)" format.

    An error message will be displayed.



REFERENCES

Microsoft Access "User's Guide," version 1.0, pages 66-68 and page 163

Microsoft Access "User's Guide," version 1.1, pages 67-68, 84-87, and page 167

Keywords : kb3rdparty
Issue type : kbbug
Technology :


Last Reviewed: November 4, 2000
© 2001 Microsoft Corporation. All rights reserved. Terms of Use.