Related to create statement error message .

Posted by Admin on 20-Feb-2008 08:32

Hi All,

I have found an iteresting thing, please tell me why it is so .

I m giving two peace of code .

1.

define temp-table ttcustomer like customer.

create ttcustomer .
Assign
ttcustomer.name = "data1".

create ttcustomer .
Assign
ttcustomer.name = "data2".

2.

define temp-table ttcustomer like customer.

create ttcustomer .
Assign
ttcustomer.name = "data1".

create ttcustomer .
Assign
ttcustomer.name = "data2".

create ttcustomer .
Assign
ttcustomer.name = "data3".

Now, when I run first code i get "ttcustomer already exists with 0" 3 times.

But when I run second code I get the same error message just only once.

Why it is so ?

Thanks

Vishwdeep

All Replies

Posted by ChUIMonster on 21-Feb-2008 08:04

I'm assuming that you're using the sports2000 database.

You're getting errors because the customer table has a unique index on custNum and you aren't setting that field to a unique value.

It is kind of odd that the message appears 3 times in the first case and just once in the second -- I don't, offhand, have a simple answer for that but it's related to retry handling and, I think probably, automatic infinite loop protection.

Posted by Admin on 21-Feb-2008 08:10

Posted by ChUIMonster on 21-Feb-2008 09:08

Like I said... I think that it is probably related to RETRY handling. And, probably, automatic infinite loop protection.

Your sample code has no condition handling (ON ERROR UNDO, ...).

Posted by Håvard Danielsen on 21-Feb-2008 09:12

I cannot explain why you get 3 error messages either. As far as I can see both cases will cause an undo, retry of the procedure block, with the automatic infinite loop protection kicking in to prevent the retry.

The behavior is different because the ABL's default error handling will detect and report the error when the 2nd record is written to the temp-table. In the first case this happens when the procedure block goes out of scope. In the second case this happens when you create the third record, since the ABL need to make room for the new record in the buffer.

The 3 errors might possibly be a bug, but should not cause a problem in production code. You will (almost?) always have some control of record updates and typically wrap them in a block to control the scope and error handling and typically also use no-error to control the error messages.

Posted by Admin on 26-Feb-2008 05:29

Hi All,

Thanks for your reply. but i would highly appreciate is someone give me the specific answer to my query

Posted by Tim Kuehn on 26-Feb-2008 07:29

Thanks for your reply. but i would highly appreciate

is someone give me the specific answer to my query

Then you probably need to talk to tech support.

Posted by Admin on 28-Feb-2008 03:27

Thanks,

It would be great if someone tell me whom to contact to resolve my issue.

Regards

Vishwdeep

Posted by Admin on 28-Feb-2008 06:42

Depends on your reqion (US, EMEA, Asia-Pacific, ...). But you should find the right links in the middle column of this page: http://www.progress.com/openedge/support/index.ssp

Posted by Admin on 04-Mar-2008 08:17

Thanks,

This thread is closed