## MSQuery Error: 'DSN Name Too Long' or 'Data Truncated'

The information in this article applies to:

- Microsoft Query for Windows, version 1.0

## SYMPTOMS

In Microsoft Query, if you create a data source with a name that is 32 characters long using the Microsoft Access ODBC driver, one of the following symptoms occurs:

### Microsoft Access 1.0 Driver

> You can use that data source until you exit Microsoft Query. When you exit and then start Microsoft Query again, and attempt to use that same data source, you may receive the following error message:

> > Data source name too long

### Microsoft Access 2.0 Driver

> When you choose OK in the ODBC Microsoft Access 2.0 Setup dialog box, you receive the following error message:

> > Data truncated

> Additionally, you receive this error message when you choose Other in the Select Data Source dialog box, and you cannot create a new data source.

## CAUSE

When you exit Microsoft Query, the data source name is written to the [Data Sources] section of the MSQUERY.INI file, which located in your Microsoft Windows directory. When you create a data source using the Microsoft Access version 1.0 ODBC driver, if the data source name is 32 characters long, the word "ADMIN" is appended to the data source name in the MSQUERY.INI file. This causes the error message above to appear when you attempt to use the data source again after you close and then start Microsoft Query again.
When you create a data source using the Microsoft Access version 2.0 ODBC driver, if the data source name is 32 characters long, the entry is not written to the MSQUERY.INI file, and does not appear in the Available Data Sources list.

## RESOLUTION

To avoid receiving this error message, create a data source name (DSN) that is between 1 and 31 characters long.
NOTE: Because there are several versions of Windows, the following steps may be different on your computer. If they are, please consult your product documentation to complete these steps.
If you receive either of the above error messages after creating a data source using the Microsoft Access ODBC driver, do the following to correct this error message:

1. Run the Control Panel, and double-click the ODBC icon.
2. From the Data Sources (Driver) list, select the Access 1.0 data source that returns the error message in Microsoft Query, or the Access 2.0 data source that does not appear in Microsoft Query, and choose Setup.
3. In the Data Source Name, enter a new name that has fewer than 32 characters. Choose OK.
4. Close the Data Sources dialog box, and close Control Panel.
5. Run Microsoft Query. Choose New Query from the File menu.
6. From the Available Data Sources list, select the data source that returns the error message, and choose Remove.
7. Choose Other. Select the data source that you modified in Step 3 above, and choose OK.

You can now use the data source with the name that you modified in Step 3 above.

## STATUS

Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article.

Additional query words: 5.00

Keywords : xlquery
Version : WINDOWS:1.0
Platform : WINDOWS
Issue type :
Technology :

Last Reviewed: September 1, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use.