Difference between revisions of "Incorrect syntax near '='"

From Galen Healthcare Solutions - Allscripts TouchWorks EHR Wiki
Jump to navigation Jump to search
(New page: This is an error that you may see in a ConnectR interface into Allscripts. The source of the error lies in the Mapping and/or Message Definition. The error you see is: <br>[[Image:Incorr...)
 
Line 19: Line 19:
 
** Review this with the ConnectR Message Definition.  <br>[[Image:Incorrect syntax near '=' - ConnectR wrong data type.jpg]]<br><br>
 
** Review this with the ConnectR Message Definition.  <br>[[Image:Incorrect syntax near '=' - ConnectR wrong data type.jpg]]<br><br>
 
* Make any appropriate changes, and cycle the interfaces using the Mappings and Message Definitions. <br> [[Image:Incorrect syntax near '=' - ConnectR correct data type.jpg]]<br> <br>
 
* Make any appropriate changes, and cycle the interfaces using the Mappings and Message Definitions. <br> [[Image:Incorrect syntax near '=' - ConnectR correct data type.jpg]]<br> <br>
 +
 +
* If this has still not resolved the error,a variant of the error can manifest itself due to the incorrect "Form" existing in the interface mapping
 +
<pre>Error occurred while filing (dDirect returned -1).
 +
SQL State: 37000
 +
Native Error 170
 +
Error Message: [Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near '='.
 +
</pre>
 +
*For example, the following interface mapping maps a 'P' as the ProviderForm:
 +
[[Image:CxRInvalidFormMapping.gif]]<br><br>
 +
*Valid forms include the following
 +
**M - Mnemonic
 +
**C - EntryCode
 +
**I - ID
 +
**N - Name (be careful as this is not a unique identifier and thus may error if multiple matches are found)
 +
 +
*The FileResult_CMS stored procedure does not handle an incorrect form well and hence the cryptic error.

Revision as of 22:43, 3 June 2009

This is an error that you may see in a ConnectR interface into Allscripts. The source of the error lies in the Mapping and/or Message Definition.

The error you see is:
Incorrect syntax near '=' - ConnectR error.jpg

Error occurred while filing (dDirect returned -1).
SQL State: 37000
Native Error 102
Error Message: [Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near '='.


Resolution

  • Review a message that has this error.
  • Find any fields marked as "int" that have no value whatsoever.
    Incorrect syntax near '=' - ConnectR no value.jpg

  • Review the Mapping to ensure that any "int" fields have a value. The "default" value for many integers is zero.
  • Review the Message Definition to ensure that all fields marked as int, are in fact integers in the SQL Stored Procedure.
    • You can view the SQL data types in SQL Server Management Studio: Object Explorer -> Server -> Databases -> Works -> Programmability -> Stored Procedures -> [Stored Procedure Name, e.g. FileResult_CMS] -> Parameters.
      Incorrect syntax near '=' - SQL data type.jpg

    • Review this with the ConnectR Message Definition.
      Incorrect syntax near '=' - ConnectR wrong data type.jpg

  • Make any appropriate changes, and cycle the interfaces using the Mappings and Message Definitions.
    Incorrect syntax near '=' - ConnectR correct data type.jpg

  • If this has still not resolved the error,a variant of the error can manifest itself due to the incorrect "Form" existing in the interface mapping
Error occurred while filing (dDirect returned -1).
SQL State: 37000
Native Error 170
Error Message: [Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near '='.
  • For example, the following interface mapping maps a 'P' as the ProviderForm:

CxRInvalidFormMapping.gif

  • Valid forms include the following
    • M - Mnemonic
    • C - EntryCode
    • I - ID
    • N - Name (be careful as this is not a unique identifier and thus may error if multiple matches are found)
  • The FileResult_CMS stored procedure does not handle an incorrect form well and hence the cryptic error.