Subject Re: [IBO] Basic Tuturial Errors
Author Svein Erling Tysvær
Jeff,

I'm not aware of any problems with Tutorial3, but in Tutorial1 you have to
change a procedure in the script component to

CREATE PROCEDURE SP_GEN_DUMMY_ITEM(P_CATEGORY_ID INTEGER, P_DESCRIPTION
VARCHAR(50), P_BAR_PREFIX VARCHAR(5), P_COUNT INTEGER) AS
DECLARE VARIABLE i INTEGER;
BEGIN
i = 1;
WHILE ( i <= :P_COUNT ) DO BEGIN
INSERT INTO ITEM(ID_CATEGORY, DESCRIPTION, BARCODE,
COST_PRICE,
CURR_VALUE)
VALUES( :P_CATEGORY_ID,
( :P_DESCRIPTION || ' ' || :i ),
( :P_BAR_PREFIX || cast(( :P_CATEGORY_ID * (
100000 + :i ) +
:i *
10000 + :i * 10 + :P_CATEGORY_ID ) as Integer) ),
( :i * 121 + :P_CATEGORY_ID * 10 + :i ),
( :i * 59 ) );
i = i + 1;
END /* WHILE */
END !!

The change is in the cast as Integer bit (otherwise IB6 adds .0000000000).
Make this change and see if it will work for you then.

Set

At 21:47 15.01.2001 -0000, you wrote:
>I have been going through the tuturials that Jason has incorporated
>with IBObjects and reading the helps and whatever else I can get my
>hands on to learn and understand IB and IBO.
>
>In working with the Basic Tuturials I encounter an error when the
>program attempts to create the necessary database and tables. The
>error occurs for all of the basic tuturials and the message reads as
>follows: "Project Tuturial3.exe raised exception class EIB_ISCError
>with message 'ISC ERROR CODE: 335544321
>ISC ERROR MESSAGE:
>arithmetic exception, numeric overflow, or string truncation'.
>
>The execution stops on line 828 of IB_Session.pas.
>
>My guess is that the tuturial was not written for IB v6.x which is
>what I have installed and that the script doing the work needs to be
>updated. Would someone please let me know what needs to be fixed so
>that I can make the necessary changes to the scripts.
>
>Thank you.
>Jeff Kreider
>
>
>
>
>