
Bruce Knox Database Programmer/Analyst
date
last updated 11/23/03
This page is a solution to the MS Access 2000 error message:
The width of a Unicode text column must be an even number of bytes.
The MS Access 2000 Install apparently sets the Longs Registry setting to false and then gives the erroneous error message when accessing Oracle LONG datatype fields.
This Longs Registry setting is a Workaround for potential problems with the Oracle LONG datatype which has been changed considerably since Oracle7.
This error occurs with both Oracle7 and Oracle8 and can make previously working Queries fail.
There is a "Longs" setting in the ODBC setup for each of your ODBC Data Sources using the Oracle ODBC Driver.
Set this to “T” to Force Retrieval of Longs. That is, Force Retrieval of Oracle LONG datatype fields.
This ends up in a Registry entry something like:
[HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\server_prod]
"Longs"="T"
"DSN"="server_prod"
There are lots of other items in that section of the Registry and unless you have experience modifying the registry I would suggest you change the setting via the Control
Panel if you are using Oracle8.
For Oracle7, you can change the Registry or replace
the DSN using Microsoft ODBC for Oracle Driver.
Changing your settings may be an IT support staff issue.
If you are unaware, the Registry is a key windows file and can be corrupted to the point that your machine will not function. Even small changes, such as Longs=F, can make applications fail and can prove to be very difficult to debug.
You can back up your registry, but the backup file can be very large.
To change the setting for Oracle8 via the Control Panel:
Start>Settings>Control Panel>
[Administrative Tools>Data Sources (ODBC) for Windows 2000 OR
ODBC Data Sources (32bit) for Windows 95/98 ]
>ODBC Data Source Manager>System DSN>
for each Data Source Name for Driver "Oracle ODBC Driver", e.g., server_prod,
Select Button Configure...
On the Oracle 8 ODBC Driver Configuration window, select Tab Workarounds.
Check Box for Force Retrieval of Longs. Ok. Ok.
(ditto for all Data Sources using the Oracle ODBC Driver)
That changes the registry setting "Longs" without running regedit:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\server_prod]
"Longs"="T"
"DSN"="server_prod"
Disclaimer
Use this information and these scripts at your own risk. As a condition of using these
scripts and information from this site, you agree to hold harmless both the
University of Arkansas Cooperative Extension Service and Bruce Knox for any
problems that they may cause or other situations that may arise from their use,
and that neither the Extension Service nor I will be held liable for those
consequences. The scripts and
information are provided "as is" without warranty, implied or
otherwise. Limitation of liability will
be the amount paid to the University of Arkansas specifically for this
information. (It was free:)
http://www.uaex.edu/bknox/ms_access_2000_oracle_long_datatype.htm