DB2 record add problem


Author
Message
Keith Chisarik
Keith Chisarik
StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)
Group: StrataFrame Users
Posts: 939, Visits: 40K
So..... I got my DB2 project working to display and edit existing records.



When I try to add a record I always get a conversion error on the primekey field.



I know DB2 doesn't have auto increment fields (does it?) so I have to manually manage the primekeys but I don't even get a chance. I get this error as soon as I hit the add button, or programmatically call BO.add().



I have two projects referencing two different libraries/tables with primekeys of different data types exhibiting the same behavior.



Any ideas? Please see the attached error image, I cant seem to add images to posts anymore.

Keith Chisarik
Attachments
db2adderror.jpg (140 views, 59.00 KB)
Replies
Keith Chisarik
Keith Chisarik
StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)StrataFrame VIP (2.4K reputation)
Group: StrataFrame Users
Posts: 939, Visits: 40K
Yes changing that property to false is what got me past my problem updating existing records, which I can do fine. I just cant add records.

Keith Chisarik
Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
Well, this is happening in the Get of the property so this indicates that something is trying to pull a value.  So two things, look at and/or post the call stack so that we can see where it is coming from.  Also, have you initialized the field in the SetDefaultValues event?  You mentioned that this is happening when you call the Add(), so at this point, the server has never been queried.  So more than likely you are not allowing the fields to be initialized and have not set a value in the SetDefaultValues before something is trying to query the property.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
Keith Chisarik - 18 Years Ago
Keith Chisarik - 18 Years Ago
Trent L. Taylor - 18 Years Ago
Keith Chisarik - 18 Years Ago
Trent L. Taylor - 18 Years Ago
Keith Chisarik - 18 Years Ago
Trent L. Taylor - 18 Years Ago
     gotcha
Keith Chisarik - 18 Years Ago
Keith Chisarik - 18 Years Ago
Keith Chisarik - 18 Years Ago
Keith Chisarik - 18 Years Ago
Keith Chisarik - 18 Years Ago
StrataFrame Team - 18 Years Ago
Keith Chisarik - 18 Years Ago
Keith Chisarik - 18 Years Ago
Trent L. Taylor - 18 Years Ago
Keith Chisarik - 18 Years Ago
Trent L. Taylor - 18 Years Ago
Keith Chisarik - 18 Years Ago
StrataFrame Team - 18 Years Ago
Keith Chisarik - 18 Years Ago
StrataFrame Team - 18 Years Ago
Keith Chisarik - 18 Years Ago
PeterA - 18 Years Ago

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search