COUNT field incorrect

From Galen Healthcare Solutions - Allscripts TouchWorks EHR Wiki
Revision as of 16:01, 7 November 2012 by Doug.Gracie (talk | contribs) (Created page with "==Issue== You get an ConnectR error from a superset saying something like: Stored Procedure ExtractOrderItem_CMS, EventSequenceID: 15686, Error: SQL State 07001, Native Error ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Issue

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

Reasons

  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

Resolution

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.
    Count1.jpg
  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).
    Count2.jpg
  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.

Permissions

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