DDT Exceptions when deploying package.


Author
Message
George Nentidis
George Nentidis
StrataFrame Novice (118 reputation)StrataFrame Novice (118 reputation)StrataFrame Novice (118 reputation)StrataFrame Novice (118 reputation)StrataFrame Novice (118 reputation)StrataFrame Novice (118 reputation)StrataFrame Novice (118 reputation)StrataFrame Novice (118 reputation)StrataFrame Novice (118 reputation)
Group: Forum Members
Posts: 72, Visits: 251
Hi,

I have added a new Data Deployment package in my DDT project and I get a few exceptions:

1. When deploying a uniqueidentifier column that contains NULL values, I get an Invalid Cast exception. After filling up all values it works fine.

2. When deploying a nvarchar column that contains NULL values, I get an exception saying that it cannot convert DBNull to String. After filling the values here too, it works fine.

3. When deploying a timestamp column, I get an SQL exception saying that timestamp columns cannot be assigned. Which is true, since timestamps get values on their own.

I can provide you with the package if you think it could help more.

Trent Taylor
Trent Taylor
StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
When deploying a uniqueidentifier column that contains NULL values, I get an Invalid Cast exception. After filling up all values it works fine.

The answer to this is already out here on the forum as I have answered this a number of times already...you cannot have NULL data in a deployment data package.  We may make a change in the future to allow this...but it will require a relatively large change in the way teh data is packaged...and then making it backward compatible, etc.

When deploying a nvarchar column that contains NULL values, I get an exception saying that it cannot convert DBNull to String. After filling the values here too, it works fine.

Read the first answer.

When deploying a timestamp column, I get an SQL exception saying that timestamp columns cannot be assigned. Which is true, since timestamps get values on their own.

First time I have ever heard of someone trying to deploy a timestamp value since this is generated by the SQL side...I can add this to the list to look at so ensure that a timestamp column never tries to deploy data.  I will put this on the list, but we are in the middle of making a lot of changes to the DDT anyway, so this will not be an immediate change.

I can provide you with the package if you think it could help more.

Not necessary....the top 2 problems will not be changed (at least in the immediate future).  I will look at the time stamp deployment next week.

Charles R Hankey
Charles R Hankey
Advanced StrataFrame User (764 reputation)Advanced StrataFrame User (764 reputation)Advanced StrataFrame User (764 reputation)Advanced StrataFrame User (764 reputation)Advanced StrataFrame User (764 reputation)Advanced StrataFrame User (764 reputation)Advanced StrataFrame User (764 reputation)Advanced StrataFrame User (764 reputation)Advanced StrataFrame User (764 reputation)
Group: Forum Members
Posts: 524, Visits: 30K


I am working with DDT right now trying to get a more granular understanding of how to make it do its tricks.



I am trying to create a database from scratch in DDT, then deploy to server.



This is the first time I've tried having DDT create CRUD sprocs.



Table definition includes a timestamp



I have the update and delete sproc marked as optimistic timestamp



Deployment fails on creating update sproc saying you can't update a timestamp

Insert sproc fails saying use a field list and exclude timestamp or enter a default (not sure what works as a default for a timestamp - 0 and ' ' don't seem to.)



I see no way to influence how sprocs are going to be generated.



From previous messages in this thread I'm thinking maybe DDT doesn't handle sproc creation when there are timestamps. I tried deleting timestamp field, deploying, then adding timestamp, unchecking autogenerate sprocs and deploying again - of course that wiped out my crud sprocs as they had been initially creaeted by DDT and had the extended props.



Soooo - how do you have DDT generate sprocs that use Optimistic timestamp for update?



Sorry if I'm just being boneheaded but searched forum and don't really see an answer (or at least one that is simple enough for me to understand Smile



Charles R Hankey
Charles R Hankey
Advanced StrataFrame User (764 reputation)Advanced StrataFrame User (764 reputation)Advanced StrataFrame User (764 reputation)Advanced StrataFrame User (764 reputation)Advanced StrataFrame User (764 reputation)Advanced StrataFrame User (764 reputation)Advanced StrataFrame User (764 reputation)Advanced StrataFrame User (764 reputation)Advanced StrataFrame User (764 reputation)
Group: Forum Members
Posts: 524, Visits: 30K
Sorry - I really was being thick.



Blush



I read http://forum.strataframe.net/FindPost10529.aspx - Ben's reply over a year ago saying you had to set the combobox at the bottom of the Table Properties to the field used for rowversioning and I looked at that combo and set it to the pk ....



Slowly it is starting to gel ... slowly



SET OPTIMISTIC TIMESTAMP

SET THE ROWVERSION COMBO TO THE TIMESTAMP FIELD w00t





Ivan George Borges
Ivan George Borges
Strategic Support Team Member (2.8K reputation)Strategic Support Team Member (2.8K reputation)Strategic Support Team Member (2.8K reputation)Strategic Support Team Member (2.8K reputation)Strategic Support Team Member (2.8K reputation)Strategic Support Team Member (2.8K reputation)Strategic Support Team Member (2.8K reputation)Strategic Support Team Member (2.8K reputation)Strategic Support Team Member (2.8K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
Hi Charles!

Hope everything is fine with you.

You might consider using row version instead...

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

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search