<docbook><section><title>UnableToUnderstandAfterDECLARE</title><title> Error Message: Unable to Understand after DECLARE </title> Error Message: <computeroutput>Unable to Understand after DECLARE</computeroutput> 
<bridgehead class="http://www.w3.org/1999/xhtml:h2"> General Advice </bridgehead>
<computeroutput>Unable to understand after - &quot;DECLARE&quot;</computeroutput> is a generic Progress syntax error.
 If you receive &quot;DECLARE&quot; errors, take the following action:<orderedlist spacing="compact"><listitem> Identify the SQL statement that is associated with this error.
 You may need to <ulink url="GeneratingClientsideODBCTracesAllDrivers">generate a client-side ODBC trace</ulink>, if your client application generates SQL for you.
</listitem>
<listitem> Look for obvious flaws or incompatibilities in the structure of the statement.
<itemizedlist mark="bullet" spacing="compact"><listitem> Progress may not be able to handle complex and/or nested <computeroutput>JOIN</computeroutput> queries.
</listitem>
<listitem> Progress databases do not recognize the <computeroutput>AS</computeroutput> keyword for column aliasing.
 Progress 9.x was the first version to support standard SQL column aliasing.
</listitem>
<listitem> Progress 6, 7, and 8 do not support standard SQL column aliasing.
 They do have a special <computeroutput>LABEL</computeroutput> keyword which allows aliasing within &quot;native&quot; Progress applications.
 Our drivers do not support this keyword.
</listitem>
</itemizedlist></listitem>
<listitem> Test the SQL statement through C++ Demo, odbctest, JDBC Demo, or another simple application.
 See if the error persists.
</listitem>
<listitem> Test the SQL statement through a Progress native interface such as clidemo.
 See if the problem persists.
</listitem>
<listitem> Finally, contact <ulink url="OpenLink">OpenLink</ulink> Product Support, if you cannot detect the source of this problem.
 When you contact us, please be sure to include the results of the tests described above.</listitem>
</orderedlist><para> </para><bridgehead class="http://www.w3.org/1999/xhtml:h2"> Advice for Crystal Reports and Business Objects users </bridgehead>
<para>Our drivers may produce varied results when used in conjunction with a Progress database and Seagate Crystal Reports.</para><para>Some Crystal Reports auto-generated SQL used with our Release 3.2 components will succeed.</para><para>However, Crystal Reports auto-generated SQL for use with our Release 4.x and up will often produce the error.</para><para>This error may be caused by one of the following:</para><bridgehead class="http://www.w3.org/1999/xhtml:h3"> JOIN query </bridgehead>
<para>Queries generated by Crystal Reports which join multiple tables will use advanced SQL JOIN syntax, which Progress&#39; SQL-89 interface does not support.
 Note that all Multi-Tier Agents with the naming convention &quot;pro8*&quot; or &quot;pro9*&quot; connect to the Progress SQL-89 interface and thus will expose this problem.
 The SQL-92 based Agents and Lite drivers should get around this problem as they are using the advanced SQL-92 Progress engine which will understand this query syntax.</para><para>If you experience this problem, take the following action:</para><orderedlist spacing="compact"><listitem> Download ODBCRegs.zip from: <computeroutput>http://support.crystaldecisions.com/updates</computeroutput>.
</listitem>
<listitem> Replace the current <computeroutput>C:\WINNT\SYSTEM32\P2SODBC.DLL</computeroutput> file with the file contained in ODBCRegs.zip.
</listitem>
<listitem> Run <computeroutput>OUTJOIN.REG</computeroutput> from the zip file.
</listitem>
<listitem> Run <computeroutput>regedt32</computeroutput> or <computeroutput>regedit</computeroutput> from a DOS prompt.
</listitem>
<listitem> Select <computeroutput>HKEY_CURRENT_USER</computeroutput> -&gt; <computeroutput>SOFTWARE</computeroutput> -&gt; <computeroutput>SEAGATE SOFTWARE</computeroutput> -&gt; <computeroutput>CRYSTAL REPORTS</computeroutput> -&gt; <computeroutput>DatabaseOptions</computeroutput> -&gt; <computeroutput>OuterJoin</computeroutput>.
<itemizedlist mark="bullet" spacing="compact"><listitem> Note -- the exact drilldown varies with different versions of Crystal Reports.
</listitem>
</itemizedlist></listitem>
<listitem> Double-click the &quot;PlusEqual&quot; key.
</listitem>
<listitem> At the end of the string, add the DLL name of the OpenLink driver you are using.
 E.g., for Release 4.x Multi-Tier, you would add:  <computeroutput>, olod4032</computeroutput> </listitem>
<listitem> Exit the registry editor and test.</listitem>
</orderedlist><para>To get around this issue entirely, you can change the syntax of the generated query manually.
 For example, if you were joining the customer, order, and order-line tables, you could change the Crystal Reports query to the following, where no <computeroutput>JOIN</computeroutput> syntax is used:</para><programlisting>SELECT
    ol.Price, ol.Qty,
    o.Odate, o.Pdate, o.Shipped,
    c.Cust-num, c.Name, c.Address, c.City
FROM
    pro1.order-line ol,
    pro1.order o,
    pro1.customer c
WHERE
    ol.Order-num = o.Order-num
AND
    o.Cust-num = c.Cust-num
</programlisting><bridgehead class="http://www.w3.org/1999/xhtml:h3"> Spaced aliasing </bridgehead>
<para>If you are using Crystal Reports 9, a problem was introduced in this version which may produce the above error message.
 Queries using spaced aliasing will cause this problem, for example -- </para><programlisting>SELECT  customer . Name  FROM    DYN . Customer   customer
</programlisting><para> Our Release 5.x and later drivers have a built-in workaround for this issue.</para><para> </para><bridgehead class="http://www.w3.org/1999/xhtml:h2"> Evidence </bridgehead>
<itemizedlist mark="bullet" spacing="compact"><listitem> ODBC Client Trace </listitem>
<listitem> DBMS Version </listitem>
</itemizedlist></section></docbook>