This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
When inserting to SQL server with access method set to stored procs I get this error: An error occurred when trying to assign a new Identity value to this entity. Check inner exception for details The inner exception is : Null object cannot be converted to a value type. If I switch to tables then it works fine. The pk is an identity column. Any ideas? Does anyone have a tempalte for an insert proc? I'm not sure if the identity value should be returned or passed back via an output param.
Thanks
|
|
|
Hi Peter, Does your insert procedure return a scalar result which is the id of the newly inserted row? The error looks to be coming from a NULL result being assigned for the execution of the insert proc. e.g. INSERT INTO TestTable(Name, Description) VALUES(@name, @description);
Jeremy |
|
|
Yes, it does. I've also tried having an out parameter for the identity. No joy either way. Have reverted to table access for now.
Cheers |
|
|
Would you be able to email through a small repro sample for this? If you can I can have a look into this for you.
Jeremy |
|