An error occurred with the pass-through SQL connection…ODBC support codes

Error:

When trying to do a Price Check, you receive the following error:

 

An error occurred with the pass-through SQL connection.

ODBC support codes: 58 4121 [Microsoft][SQL Server Native Client 10.0][SQL Server]Cannot find either column ‘dbo’ or the user-defined function or aggregate ‘dbo.OPCalculateUnitPrice’, or the name is ambiguous. 37000

 

Cause:

The OPCalculateUnitPrice function is a part of the Omni Price SQL API. You may have ran the SQL API script against the DYNAMICS database in SQL Server Management Studio as well as against your company database(s).
Or you may have the checkbox “Use SQL API” marked on the Price Check window, but you haven’t ran the SQL API script against the databases to create the files needed.

 

Resolution:

The Views and Functions that were added to DYNAMICS database by the SQL API script need to be removed. To do this, follow these steps:

  1.   Make a complete restorable backup and have all users exit the system.
  2.   Open SQL Server Management Studio.
  3.   Click New Query.
  4.   Select the DYNAMICS database.
  5.   Open the SQL API script in the New Query window.  (This can be downloaded from our website from our downloads page for the corresponding version.)
  6.   Click Edit, click Find and Replace, and then click Quick Find.
  7.   Enter CREATE VIEW in the Find what field.
  8.   Click Find Next.
  9.   Once you have found the topmost CREATE VIEW script, highlight that script through the end of the script.
  10.   Press your Delete key.
  11.   Click Query, and then click Execute.