Problem:

I get error message "Incorrect Number of Values for This Table (118)" when
attempting to insert two variable values into a two-column table.

Syntax, or bad data?

TRACE shows that prior to entering the IF/ENDIF structure, these three
variables:

vColNAME
vRecordCNT
vSerialNUM

... are properly formed and data-typed, with expected test values. 

The code crashes at the line indicated.

--********************************
IF vRecordCNT > 1 THEN
SWITCH vColNAME

CASE 'ColNAME1'

INSERT INTO Inspect_ColNAME1 +
( SerialNUM, RecordCNT ) +
VALUES +
( .vSerialNUM, .vRecordCNT )

BREAK

CASE 'ColNAME2'

INSERT INTO Inspect_ColNAME2 +
( SerialNUM, RecordCNT ) +
VALUES +
( .vSerialNUM, .vRecordCNT )  -- *** ERROR HERE ***

BREAK

CASE DEFAULT

INSERT INTO Inspect_OtherNAME +
( SerialNUM, ColNAME, RecordCNT ) +
VALUES +
( .vSerialNUM,  .vColNAME, .vRecordCNT )

BREAK

ENDSW
GOTO BlahBlah

ENDIF


Appreciate any perspective,

Bruce


Reply via email to