I have a customer who is receiving a error 78 - Invalid Number Of Parameters. I know this is generally caused by the length of the POSITION(VIEW) value exceeding the template generated limit of 1024 characters. see: What causes an Error 78 and/or sometimes "phantom" records in a browse?
I’m pretty certain this is not the case. I have a their database in my dev environment and do not get the error here. I’ve confirm the position length for this view is only 291 characters.
Our SQL Servers are both SQL 2019 (Theirs is CU18 and mine is CU16).
I have the Clarion database trace results from the client that is showing the error. It is indeed occurring on Reset(View) Previous(View). The error indicates “Size not equal for key INP:INSPECTORKEY”. This key consists of two LONG in Clarion and 2 INT columns in the SQL database.
038CCH(6) 15:11:37.196 RESETfile(VIEW:10474328:dbo.InspectorProject:0114E1280H|DBO.Project:0114D6848H|DBO.ProjectStatus:0114D6ED0H|DBO.Department:0114D76C4H) Time Taken:0.00 secs
038CCH(6) 15:11:37.196 GET_PROPERTY(VIEW:10474328:dbo.InspectorProject:0114E1280H|DBO.Project:0114D6848H|DBO.ProjectStatus:0114D6ED0H|DBO.Department:0114D76C4H) Time Taken:0.00 secs
038CCH(6) 15:11:37.196 SET_PROPERTY(VIEW:10474328:dbo.InspectorProject:0114E1280H|DBO.Project:0114D6848H|DBO.ProjectStatus:0114D6ED0H|DBO.Department:0114D76C4H) Time Taken:0.00 secs
038CCH(6) 15:11:37.196 GET_PROPERTY(VIEW:10474328:dbo.InspectorProject:0114E1280H|DBO.Project:0114D6848H|DBO.ProjectStatus:0114D6ED0H|DBO.Department:0114D76C4H) Time Taken:0.00 secs
038CCH(6) 15:11:37.196 SET_PROPERTY(VIEW:10474328:dbo.InspectorProject:0114E1280H|DBO.Project:0114D6848H|DBO.ProjectStatus:0114D6ED0H|DBO.Department:0114D76C4H) Time Taken:0.00 secs
038CCH(6) 15:11:37.196 Size not equal for key INP:INSPECTORKEY
038CCH(6) 15:11:37.196 PREVIOUS(VIEW:10474328:dbo.InspectorProject:0114E1280H|DBO.Project:0114D6848H|DBO.ProjectStatus:0114D6ED0H|DBO.Department:0114D76C4H) Error: Invalid Number Of Parameters Time Taken:0.00 secs
038CCH(6) 15:11:37.196 INP:INPUNIQUE : 1405
038CCH(6) 15:11:37.196 INP:INSPECTORUNIQUE : 42
038CCH(6) 15:11:37.196 INP:PROJECTUNIQUE : 307
038CCH(6) 15:11:37.196 PRJ:PROJECTNUMBER : '21-R-5 (8845)'
038CCH(6) 15:11:37.196 PRJ:DESCRIPTION : '2021 Pipe Culvert Repairs/Replacements'
038CCH(6) 15:11:37.196 PRJ:PRJUNIQUE : 307
038CCH(6) 15:11:37.196 PRJ:STATUSUNIQUE : 8
038CCH(6) 15:11:37.196 PRJ:DEPARTMENTUNIQUE : 2
038CCH(6) 15:11:37.196 PBS:DESCRIPTION : 'Partial Shutdown'
038CCH(6) 15:11:37.196 PBS:FORECOLOR : 33023
038CCH(6) 15:11:37.196 PBS:PBSUNIQUE : 8
038CCH(6) 15:11:37.196 DPT:DESCRIPTION : 'Public Works Bureau Of Engineering'
038CCH(6) 15:11:37.196 DPT:DPTUNIQUE : 2
Table definition:
InspectorProject FILE,DRIVER('MSSQL'),OWNER(GBL:Owner),NAME('dbo.InspectorProject'),PRE(INP),BINDABLE,CREATE,THREAD !Inspector Projects
UniqueKey KEY(INP:INPUnique),OPT,PRIMARY !Primary Unique Key
ProjectKey KEY(INP:ProjectUnique,INP:InspectorUnique),DUP,OPT !Link to Project table
InspectorKey KEY(INP:InspectorUnique,INP:ProjectUnique),OPT !Link to Inspector table
Record RECORD,PRE()
INPUnique LONG !
ProjectUnique LONG !Unique Key Field
InspectorUnique LONG !Unique Key Field
ChgDateTime STRING(8) !
ChgDateGrp GROUP,OVER(ChgDateTime) !Record Change Date/Time Group
ChgDate DATE !Date of Record Change
ChgTime TIME !Time of Record Change
END !
END
END
SQL Table:
CREATE TABLE [dbo].[InspectorProject](
[INPUnique] [INT] IDENTITY(1,1) NOT NULL,
[ProjectUnique] [INT] NULL,
[InspectorUnique] [INT] NULL,
[ChgDateTime] [DATETIME] NULL
) ON [PRIMARY]