Microsoft KB Archive/66435

{| = DDE Link to Q+E Truncated by Excel =
 * width="100%"|

Last reviewed: November 2, 1994

Article ID: Q66435

SUMMARY
Microsoft Excel for Windows has a limit of 128 characters for the item (application name) and the topic in a DDE link. If you enter a link with either an item or a topic longer than 128 characters, Excel will truncate it.

MORE INFORMATION
When you use the Copy and Paste Link commands to copy and paste SQL text from Q+E to Excel, the item or topic in the link created may be longer than 128 characters. The formula will be truncated by Excel, but the data will display and update correctly.

If you attempt to enter the link formula in Excel or modify a pasted link when the item or topic portions are longer than 128 characters, Excel will truncate the link and display an error message.

For example, if the following is entered into a cell in Excel 2.00, 2.01, 2.10, 2.10c, and 2.10d

=QE|'SELECT FIRST_NAME, LAST_NAME, EMP_ID, HIRE_DATE, SALARY, DEPT, EXEMPT, INTERESTS FROM dBASEFile|D:\WINAPPS\QE\QE250\EMP.DBF WHERE HIRE_DATE > {06/01/80} AND SALARY > 27000.00'!ALL the result after pressing ENTER would be: =QE|'SELECT FIRST_NAME, LAST_NAME, EMP_ID,HIRE_DATE, SALARY, DEPT, EXEMPT, INTERESTS FROM dBASEFile|D:\WINAPPS\QE\QE250\EMP.DBF WHERE HIRE_DATE > {06'!ALL

First Workaround

 * 1) Create a shorter query.
 * 2) Reduce the desired fields and conditions in the query.

Second Workaround
 Link to a query file. In Q+E, create a query with the desired fields and conditions selected. From the File menu, choose Save As and give the file a query name other than QUERY# (where &quot;#&quot; is a number). This will prevent confusion with future queries with the same names.  If the link is already established in Excel, replace the SELECT statement in the Excel formula with the name of the QUERY FILE. For example: =QE| |test.qef!ALL   If the link has not yet been established in Excel, do the following: a. From the Edit menu, choose Copy Special. b. For the Link Formula option, select Query Name rather than SQL text. c. Select either Entire or Selected Area rather than SQL text. This will reduce the size of the topic text in the link in Excel.  Return to Excel. From the Edit menu, choose Paste, then Paste Link to establish the DDE link with the saved Query file in Q+E.
 * }