ATTACH-DATA-SOURCE include/exclude fields

Posted by Admin on 10-May-2007 18:07

When filling a dataset I set the include fields to exclude part of the primary key (not realising this at the time) as the data was being sent to a web app. This was a child record and instead of populating all children it only populated only one as the excluded field was part of a unique primary key.

No error messages we getting returned. I checked the buffer error and error-string and dataset error and there was no indication of a problem. Is there some way to detect this error?

All Replies

Posted by Phillip Molly Malone on 11-May-2007 00:22

Not using the Merge fill mode. You would need to use the Append.

HTH

Molly

Posted by Admin on 11-May-2007 00:40

Molly, I like the image.

Under the current project we were instructed to send only things that the user needed. There was only 1 index and unfortunately it was unique and there was no warning as Merge is the default and you create primary unique indexes as primary unique on the TT.

I was more concerned in having me or another trapped in the same way and spending time to find out it was failing the create with no warning.

Posted by Phillip Molly Malone on 11-May-2007 00:54

To be fair I should say that Miles Logged a call with us.

My point of view of this is that although I understand you issue, the code is doing what it is meant to be doing, its just you didn't ask it to do the right thing. I am not saying this in a bad way but it is what has happened in this case and its hard for the product to guess where people might make mistakes.

HTH

Molly

Posted by Admin on 11-May-2007 05:25

All errors when view is retrospect are easily seen and explained. Probably a large portion of error messages are inserted to prevent stupid things. I'm not new to prodatasets but I also hadn't made a conscious decision to exclude part of the primary key.

As I explained to you I also got caught again a few hours latter on a similar error. The second buffer of a table unfortunately had a field that was not a key or link to the first buffer but that field was the key to the first buffer. That field wasn't even used and hence was empty. Unfortunately it overwrote the primary key and I ended up with 1 record with a key of 0 instead of several. It was only because of the first error that I fairly quickly found this error.

I'm questioning the wisdom of allowing this with no warning and that will also mean that I will have to reconsider my acceptance of the default fill mode of datasets.

Posted by Phillip Molly Malone on 13-May-2007 21:42

I can understand your frustration, but I am not sure that you can design the features of product to assume that someone may not use them correctly (admittedly in this case not be choice but by accident).

I mean to me this is the same situation as someone that is trying to send a message to the screen but they have actually programed it to go to a log file. Under your arguement, we should also send it to screen in case that is what the developer really meant to do.

HTH

Molly

Posted by Admin on 13-May-2007 23:25

I can understand your frustration

You are mis-understanding my concern. We all make mistakes. At a simplistic level we can either shrug them off or attempt to learn and avoid the same mistakes again - and not just for you but for others that may fall into the same trap.

The default behaviour of the PDS fill is not what I'd hoped for under the circumstances I had and I will have to review the continued use of the "merge" default under all circumstances and whether the standard mode should be otherwise.

I have used prodatasets for sometime and have not come across this problem - but there again I now can't be certain as I'd never get a warning.

I think that we have exhaused this discussion, but will have to resolve myself the treatment of PDS fills.

This thread is closed