# “… is not a valid name. Make sure that it does not include invalid characters or punctuation and that it is not too long.“ error when using ODBC drivers in MS Access

**URL:** <https://community.cdata.com/t/is-not-a-valid-name-make-sure-that-it-does-not-include-invalid-characters-or-punctuation-and-that-it-is-not-too-long-error-when-using-odbc-drivers-in-ms-access/441>\
**Category:** Editions\
**Tags:** article, odbc, sharepoint, google-calendar, google-sheets, ms-access, jira\
**Created:** [October 6, 2023, 5:44pm UTC](https://community.cdata.com/t/is-not-a-valid-name-make-sure-that-it-does-not-include-invalid-characters-or-punctuation-and-that-it-is-not-too-long-error-when-using-odbc-drivers-in-ms-access/441 "2023-10-06T17:44:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kristinab](https://avatars.discourse-cdn.com/v4/letter/k/dec6dc/32.png) [@kristinab](https://community.cdata.com/u/kristinab)\
**Post date:** [October 6, 2023, 5:44pm UTC](https://community.cdata.com/t/is-not-a-valid-name-make-sure-that-it-does-not-include-invalid-characters-or-punctuation-and-that-it-is-not-too-long-error-when-using-odbc-drivers-in-ms-access/441/1 "2023-10-06T17:44:47Z")

</div>

This error typically occurs when tables intended to be imported, contain special characters in their table names or columns, such as square brackets, dots etc. To illustrate the issue at hand, I have utilized the CData ODBC Driver for GoogleSheets as an example.

I have created a Google Sheets spreadsheet instance named _Reports,_ containing a sheet named _Sales_ and a column named _[Total]_. When this table is imported in Microsoft Access using the CData ODBC Driver for Google Sheets, the following error is thrown:

_[Total]’ is not a valid name. Make sure that it does not include invalid characters or punctuation and that it is not too long._

 ![62510317-7af5-4622-9e43-a35b58de2171.png](https://us1.discourse-cdn.com/cdata/original/2X/5/523cf9acadbf76b36e207e2ce13bc168bb9668d9.png)

To resolve the issue, we will need to set the _UseSimpleNames_ connection property to _True_ in the DSN Configuration window:

 ![5a157992-ee98-4035-9eba-181eac7d7a38.png](https://us1.discourse-cdn.com/cdata/original/1X/8ea3d46fc35d113534dce6207e7137cf03a6baa8.png)

This property makes the driver easier to use with traditional database tools as it converts any nonalphanumeric character to an underscore. When the _UseSimpleNames_ property is set to _True_ the column name is converted from _[Total]_ to _\_Total\__ and the table can be successfully accessed:

 ![f5800dee-5d10-4ee0-afdb-35fd5b61c871.png](https://us1.discourse-cdn.com/cdata/original/1X/85f79638c3231c4b25db7b1c7719afb105e62fe5.png)

NOTE: You will need to restart MS Access in order for the DSN changes to take effect. For more information about the _UseSimpleNames_ property, please consult the driver’s documentation: [https://cdn.cdata.com/help/RLJ/odbc/RSBGoogleSheets\_p\_UseSimpleNames.htm](https://cdn.cdata.com/help/RLJ/odbc/RSBGoogleSheets_p_UseSimpleNames.htm)

There are also some variations of the error:

1. If the sheet name would contain special characters, for example our sheet would be called _[Sales]_, we would get the following error:

- _“‘CDATA\_GOOGLESHEETS\_REPORTS\_[SALES]\_PRIMARYKEY\_INDEX’ is not a valid name. Make sure that it does not include invalid characters or punctuation and that it is not too long.”_&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; This issue occurs when special characters are part of the sheet name or the spreadsheet name, as opposed to the first example when they are in the column name.

1. If our sheet name would have the (\*) special character, for example _Sales\*_, the error would be:

- _“The Microsoft Access database engine could not find the object ‘GoogleSheets.Reports\_Sales\*’. Make sure the object exists and that you spell its name and the path name correctly. If 'GoogleSheets.Reports\_Sales\* ’ is not a local object, check your network connection or contact the server administrator.”_

These types of errors can also be eliminated by using the _UseSimpleNames_ property.

Please reach out to [support@cdata.com](mailto:support@cdata.com) if this does not resolve the problem for you.
