ACC2:"Invalid Argument" Error Msg Exporting Table to SQL Server
ID: Q131584
|
The information in this article applies to:
SYMPTOMS
Advanced: Requires expert coding, interoperability, and multiuser skills.
When you export a table that contains zero-length strings to Microsoft SQL
Server, you receive the error message "Invalid Argument," and the Export
command is not successful.
RESOLUTION
To work around this problem, do one of the following:
- Use Microsoft Access Upsizing Tools version 1.0 to transfer the table to
Microsoft SQL Server.
- Before exporting the table, update the fields that contain zero-length
strings so that they contain null values.
To update the fields so that they contain Null values, follow these steps.
CAUTION: Following the steps in this example will modify your table. You
may want to back up your table, or perform these steps on a copy of your
table.
- Open the database containing the table you want to export.
- Create a select query based on the table you want to export. Add all the
table's fields to the QBE grid and set Show to True for all the fields.
- Add the following new field to the QBE grid, replacing <Field2> with
the field name in your table that contains zero-length strings:
Field: Expr1:Len([<Field2>])
Criteria: 0
Note that when you run the query, a zero (0) is displayed in the new
field for each record in <Field2> that contains a zero-length string.
- Change the select query to an update query, and then type null
in the Update To row of <Field2>.
- Run the update query. Note that all the zero-length strings in <Field2>
are changed to Null values. You can now export the table to Microsoft
SQL Server.
STATUS
Microsoft has confirmed this to be a problem in Microsoft Access version
2.0. This problem no longer occurs in Microsoft Access version 7.0.
REFERENCES
Microsoft Access "User's Guide," version 2.0, Chapter 13, "Changing Data
with Action Queries," page 311
Keywords : kberrmsg kbusage OdbcSqlms
Version : 2.0 7.0
Platform : WINDOWS
Issue type : kbbug
Last Reviewed: April 29, 1999