StrataFrame Forum

Bug in DDT?

http://forum.strataframe.net/Topic27034.aspx

By Howard Bennett - 4/29/2010

Not a big deal - but - I was changing some of the table structures after importing from a DBC. I started with the Primary Key - got to the Default Value - is was greyed out but ellipsis button was enabled - so I clicked on that and was able to enter a value from the list of options shown. Of course, it wouldn't save and wouldn't let me delete that out.



Thought you'd want to take a look and see if it's something you need to fix.



HB
By Charles R Hankey - 4/30/2010

What was the primary key - i.e. what data type - and was Primary Key checked and did you have the autoincrement set up ? If it wouldn't save it you may have had conflicting stuff. Give the exact details.



Bug unlikely. Smile
By Howard Bennett - 4/30/2010

Yea - probably not a bug - but just a user doing something he shouldn't Blush



Ok - here are the steps to reproduce:



1. Select a table in DDT and modify its structure

2. Pick an INT field type

3. Change Auto-Incrementing to Enable

4. Click the ellipsis button beside Default Value and select one of the choices

5. Try to save it...

6. You get the error - but are unable to remove the default value without un-checking Enable under Auto-Incrementing.



Again - this is not really something horrible - but - perhaps the ellipsis button should be disabled when the user enables auto-incrementing (like the Primary Key is Updatable checkbox is) - and/or - maybe the textbox should be enabled if it has a value so that the user could remove what's there.



HB
By Dustin Taylor - 4/30/2010

You got us, it should disable both the text field and the browse. I've fixed it, and it will be in the next update Smile.
By Charles R Hankey - 4/30/2010

"Doctor, doctor, it hurts when I do this!"



"Don't do that!" BigGrin



If you are enabling increment on integers, you shouldn't be setting a default at all. Just set the seed and increment amount and make it a PK and you are good to go.



That will create an identity PK on the back end when you deploy to SQL.



(and if you map your BOs against DDT it will set your BO to know it does not update the PK and that the PK is auto-incrementing. )


By Howard Bennett - 5/3/2010

In this case, I've got to make the primary key column updateable as I'll be manually adding data to those records. Once the conversion is complete, I'll go back and make them auto-increment and not updateable.



Thanks again for your help!



HB
By Charles R Hankey - 5/3/2010

Test that early on in the process. I've found the one thing the DDT can be pretty unforgiving about is changing anything related to a PK (especially if you have it set to automatically create the PK index when you are in the table designer in DDT ) if you have an integer field, called it the pk but allow it to be updated, it may not let you change that later to auto increment. ( though maybe if you set the seed number right it won't be a problem. )



Anyway, easy enough to test on a couple of records just to be sure.