Skip to main content
Kofax

Must declare the scalar variable KdoLib 4006 error when migrating to SQL Server

14994

QAID # 14994 Published

Question / Problem:

Why do I receive the error message

"[4006] KdoLib: Error executing SQL command. Must declare the scalar variable "@strUsername". (137) (Line: 3) (CREATE PROCEDURE dbo.procSetAcisRCentralSiteAuth (@strUserName nvarchar(255) , @strPassword nvarchar(255) ) AS UPDATE AcisRCentralSite SET UserID=@strUsername, Password=@strPassword) (-2147217498)"

when migrating the Capture database to SQL Server?

Answer / Solution:

The error indicates that default SQL Server collation is not matching with Capture's requirements. Kofax Capture expects SQL Server to be configured to create database instances with the collation set to Latin1_General_CI_AS; the sorting style must be CI (case insensitive) and AS (accents sensitive).

To determine the current default SQL Server collation, run the query:

SELECT SERVERPROPERTY ('Collation') AS Collation.

If the returned result is not Latin1_General_CI_AS, you should proceed with the modification as documented in the Microsoft article:

Setting and Changing the Server Collation.

French version of the same article:

Définition et modification du classement du serveur.

Applies to:

Product Version
CAPTURE 10.0
  10.1
  10.2
  11.0