COUNT field incorrect

From Galen Healthcare Solutions - Allscripts TouchWorks EHR Wiki
Jump to navigation Jump to search


You get an ConnectR error from a superset saying something like: Stored Procedure ExtractOrderItem_CMS, EventSequenceID: 15686, Error: SQL State 07001, Native Error 0, Message: [Microsoft][ODBC SQL Server Driver]COUNT field incorrect or syntax error


  1. Your parameters don't match up in your ConnectR mesasge definition and your stored procedure in the works database.
  2. Execute permissions are not granted to idxusers role on stored procedure


Parameters don't match up

  1. In the works DB in SQL studio type the name of the SP, in this case : ExtractOrderItem_CMS and highlight it and press alt f1, this will tell you how many parameters the SP has.
  2. Go to the message definition for the offending message and see how many parameters it has(the first 11 will not be visible since they are inputs).
  3. Make the connectR message definition parameters match up, in this case the WRONG parameter needs to be removed, do this by highlighting the row and clicking delete on your keyboard.
  4. Re-File the message.


  1. Ensure idxusers role has execute permissions.
    Count field incorrect idxusers permissions.png