- 论坛徽章:
- 0
|
相当复杂!!! 参考文档:Document Number: 28321353
Product: IBM ISERIES CLIENT ACCESS EXP (5722XE100)
OS/400 Release: V5R1M0; V5R2M0; V5R3M0; V5R4M0
Product Release: N/A
Classification: IBM Internal Use
Status: Available
Date First Made Available 2002-10-26
Keywords: MSGSQL0104
Document Title: SQL0104 Token Not Valid - Code Page Conversion Errors on SQL Statements
Abstract
This document addresses errors where the SQL statement text appears correctly in a SQL log but is incorrectly converted resulting in corrupt data being sent to the server.
Document Description:
Most SQL0104 errors are the result of a syntax error in the SQL statement. This document addresses errors where the SQL statement text appears correctly in a SQL log but is incorrectly converted resulting in corrupt data being sent to the server. The information applies only to Client Access Express R510 and later. R510 and later do not check or report conversion errors for SQL statement text. It relies on the SQL0104 for error reporting. A cwbco trace, communications trace, or detail trace is required to verify the error. It shows a SQL statement of something like 0xF3F3F3F3F3... or other incorrect data.
The following causes have been identified for this error:
1 Corrupted MDAC installation
2 No conversion tables because of shfolder.dll version problems during installation.
3 Possible QTQRECOV-related errors.
Corrupted MDAC
Client Access detail trace shows the SQL statement text received is already corrupted.
10:54:29.97 AM ODBC P=FFF3345D T=FFF10F25 odbcprep.prepare Entry
10:54:29.97 AM ODBC P=FFF3345D T=FFF10F25 input statement text is: ???†?????????†††††???6?†††††?????†††††?????†††††??????????†††††????????†††††????††?????††???????????????† .len: 212
10:54:30.02 AM NLS P=FFF3345D T=FFF10F25 conversion error rc=6107 srcCp=1200 tarCp=37 srcLn=212 tarLn=354
10:54:30.02 AM NLS P=FFF3345D T=FFF10F25 srcBf=SELECT sts.switch_name , sts.s_v , sts.s_i , sts.s_f , sts.s_description , sts.s_datatype , sts.s_d FROM sts WHERE ( sts.switch_name = ? ) .
10:54:30.02 AM NLS P=FFF3345D T=FFF10F25 tarBf=?????????????????????????????????????????????????????????????????????????????????????????????????????????@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
In one case, the customer had an older version of odbc32.dll in the application directory. Remove duplicate copies of odbc32.dll. Re-install MDAC if necessary.
Unable to Locate the Conversion Tables
Gather the following information:
o Path that the client access conversion tables (xxxxyyyy.tbl) were installed to
o Version of shfolder.dll
o Registry key HKLM\Software\IBM\Client Access\CurrentVersion\Common ((default) and CommonPaths)
o Output of folders.exe (below)
o Detail trace (if possible use cwbcotrc with the all compontents option on if the client version is V5R2 or later)
Then, do the following:
1 R510 and later install the conversion tables into the Windows all users document folder (..\all users\documents\ibm\Client Access). The path information is retrieved from the SHGetFolderPath API exported from the Microsoft shfolder DLL. The minimum version required is 5.5.0.4027.300. Client Access installation attempts to update the DLL; however, if the DLL is locked, the installation goes to the old program files location. The circumvention is to reboot to upgrade the DLL and reinstall Client Access Express.
2 The discovered or defaulted common writable path is written to the HKLM\...\Common key:
-- As the <Default> value, in its SHORT FORM
-- As the CommonPaths value, in its LONG FORM
3 In general, any time a Client Access function that requires use of something in the common writable path (for example, a .tbl file) is run, Client Access calls SHGetFolderPath.
3a Pre-SE06839: If the call failed, it defaults to the installation path (c:\program files\ibm\client access, in the default case). That path, in its SHORT FORM, is compared to the value in HKLM\...\Common\<Default>. If the paths are the same, nothing happens. If different, the NEWER common writable path (the one just decided upon), in its SHORT FORM, is written to <Default>, and in its LONG FORM is APPENDED (separated by a semicolon) to the CommonPaths value.
3b SE06839 and later: If the call fails, the function defaults to the common writable path retrieved from the registry. The registry is not updated. The registration is updated only if the calls succeeds.
Important Note: The design and code assumes that if the common writable path has changed, regardless of whether SHGetFolderPath failed, it is due to an administrator explicitly changing/reconfiguring this path. We document that if an administrator changes or reconfigures the common writable path (for all users or the user-writable path for any given user), the administrator is responsible for moving or at least copying files from the old to the new location
See CPS 59QJR7 for further information.
Folders.exe is a utility that exercises SHGetFolderPath. It allows a user to ask it for any of the MS-defined paths including CSIDL_COMMON_DOCUMENTS (the one we are interested in). Run this program, specifying 46 (CSIDL_COMMON_DOCUMENTS) when prompted. If that fails, specify 32814 (CSIDL_COMMON_DOCUMENTS plus a flag that states that it should be created if it does not already exist). Report results, including return code, back to us.
QTQRECOV
There is an unconfirmed report that missing conversion tables on the iSeries can cause this error. Normally a communications trace shows an error on set server attributes reply, and the SQL Text should appear valid in the trace (in the job CCSID or 13488 if Unicode SQL is enabled). The recovery is to take the system to a restricted state, and run the CALL QTQRECOV command. |
|