Subject | Re: [IBO] IBO's basic tutorials |
---|---|
Author | Svein Erling Tysvær |
Post date | 2000-12-01T14:06:43Z |
Jörg,
if you change the fourth line from
CREATE DOMAIN T_CODE AS VARCHAR(20) NOT NULL;
to
CREATE DOMAIN T_CODE AS VARCHAR(30) NOT NULL;
the tutorial will work.
For some reason IB6 insists to add '.0000000000' to all calculations of
barcode when using
( :P_BAR_PREFIX || ( :P_CATEGORY_ID * ( 100000 + :i ) + :i * 10000 + :i *
10 + :P_CATEGORY_ID ) ),
in the SP_GEN_DUMMY_ITEM procedure. I haven't got a clue why why it
transforms integers this way, but Jason or Helen might know. To me it seems
like an IB6 bug.
Set
At 13:42 01.12.2000 +0100, you wrote:
if you change the fourth line from
CREATE DOMAIN T_CODE AS VARCHAR(20) NOT NULL;
to
CREATE DOMAIN T_CODE AS VARCHAR(30) NOT NULL;
the tutorial will work.
For some reason IB6 insists to add '.0000000000' to all calculations of
barcode when using
( :P_BAR_PREFIX || ( :P_CATEGORY_ID * ( 100000 + :i ) + :i * 10000 + :i *
10 + :P_CATEGORY_ID ) ),
in the SP_GEN_DUMMY_ITEM procedure. I haven't got a clue why why it
transforms integers this way, but Jason or Helen might know. To me it seems
like an IB6 bug.
Set
At 13:42 01.12.2000 +0100, you wrote:
>>Which tutorial was this exactly? I don't recognize it right off.
>
>When installing IBO the directory tutorial\basictutorials are created. In
>that directory you'll find tutorial1 through tutorial6. Jörg Schiemann is
>referring to the first of these tutorials and the sql property of the
>scrMain TIB_Script component. I took a look at it, got the same error as
>him, but didn't instantly see what was wrong. I might take a further look
>if I get the time today - but if I haven't sent an answer before you wake
>up and start IBOing Jason, I didn't find enough time.
>
>Set
>
>At 02:36 01.12.2000 -0700, Jason wrote:
>>Which tutorial was this exactly? I don't recognize it right off.
>>
>>Thanks,
>>Jason Wharton
>>CPS - Mesa AZ
>>http://www.ibobjects.com
>>
>>
>>----- Original Message -----
>>From: "Jörg Schiemann" <schimmi@...>
>>To: <IBObjects@egroups.com>
>>Sent: Friday, November 17, 2000 4:03 AM
>>Subject: [IBO] IBO's basic tutorials
>>
>>
>>> Hi,
>>>
>>> As a new IBO user I'am testing the basic tutorial which follows with
>>> IBObjects.
>>> Already with tutorial1 the trouble begins. :-(
>>> I'm using Interbase 6.0
>>>
>>> I noticed that the procedure SP_GEN_DUMMY_ITEM doesn't work.
>>> Here is the procedure:
>>>
>>> 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 || ( :P_CATEGORY_ID * ( 100000 + :i ) + :i *
>>> 10000 + :i * 10 + :P_CATEGORY_ID ) ),
>>> ( :i * 121 + :P_CATEGORY_ID * 10 + :i ),
>>> ( :i * 59 ) );
>>> i = i + 1;
>>> END /* WHILE */
>>> END
>>>
>>>
>>> I've got the errormessage:
>>>
>>> ISC ERROR CODE:335544321
>>> ISC ERROR MESSAGE:
>>> arithmetic exception, numeric overflow, or string truncation
>>> STATEMENT:
>>> TIB_DSQL: "IB_Script."
>>>
>>> SQL ERROR CODE:-802
>>> SQL ERROR MESSAGE:
>>> Arithmetic overflow or division by zero has occurred.
>>>
>>>
>>> After I changed the procedure to:
>>>
>>> DECLARE VARIABLE i INTEGER;
>>> DECLARE VARIABLE b INTEGER;
>>> BEGIN
>>> i = 1;
>>> WHILE ( i <= :P_COUNT ) DO BEGIN
>>> b = ( :P_CATEGORY_ID * ( 100000 + :i ) + :i * 10000 + :i * 10 +
>>> :P_CATEGORY_ID );
>>> INSERT INTO ITEM(ID_CATEGORY, DESCRIPTION, BARCODE, COST_PRICE,
>>> CURR_VALUE)
>>> VALUES( :P_CATEGORY_ID,
>>> ( :P_DESCRIPTION || ' ' || :i ),
>>> ( :P_BAR_PREFIX || :b || :i ),
>>> ( :i * 121 + :P_CATEGORY_ID * 10 + :i ),
>>> ( :i * 59 ) );
>>> i = i + 1;
>>> END /* WHILE */
>>> END
>>>
>>> it works.
>>>
>>> I don't know if it's only me who had the problem.
>>> Neither do I understand why the error occurs.
>>>
>>> Could someone else test it?
>>>
>>> Regards,
>>> Jörg Schiemann
>>>
>>
>>
>>
>>
>>
>>
>>
>
>
>
>
>