Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Thread More problems with my script
Mon, Jun 16 2014 7:35 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

I'm now getting an error when I run the script in the D2006 IDE

---------------------------
Debugger Exception Notification
---------------------------
Project TfR.exe raised exception class EEDBException with message 'ElevateDB Error #1011 An error occurred with the value CV on file (A conversion error occurred with the value CV on file)'.
---------------------------
Break   Continue   Help  
---------------------------


I can only assume its coming from this bit of the script

   OPEN Peoples USING CpyID;
   FETCH FIRST FROM Peoples('_fkContacts') INTO ContactID;
   WHILE NOT EOF(Peoples) DO
    OPEN Contacts USING ContactID;
    FETCH FIRST FROM Contacts('_Status') INTO ContactStatus;
    WHILE NOT EOF(Contacts) DO
     IF (ContactStatus <> 'CV on file') AND (ContactStatus <> 'Hold') AND (ContactStatus <> 'Placed') THEN
      DELETE FROM Contacts;
      OPEN Alter1 USING ContactID;
      OPEN Alter4 USING ContactID;
      OPEN Alter6 USING ContactID;
     END IF;
     FETCH NEXT FROM Contacts('_Status') INTO ContactID;
    END WHILE;
    FETCH NEXT FROM Peoples('_fkContacts') INTO ContactID;
   END WHILE;

From the table  "_Status" VARCHAR(10) COLLATE "ANSI_CI",
and from the declarations DECLARE ContactStatus VARCHAR;

_Status can be null

Roy Lambert
Mon, Jun 16 2014 9:34 AMPermanent Link

Uli Becker

Roy,

FETCH NEXT FROM Contacts('_Status') INTO ContactID;  <-------
END WHILE;
FETCH NEXT FROM Peoples('_fkContacts') INTO ContactID;

The marked line should be "... INTO ContactStatus, shouldn't it?

Uli
Mon, Jun 16 2014 10:50 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Uli

>FETCH NEXT FROM Contacts('_Status') INTO ContactID; <-------
>END WHILE;
>FETCH NEXT FROM Peoples('_fkContacts') INTO ContactID;
>
>The marked line should be "... INTO ContactStatus, shouldn't it?

Yes - this is what happens when you start foaming at the mouth, uttering strange curses and your eyes turn bright red - thanks

Roy Lambert
Image