This is a migrated thread and some comments may be shown as answers.

Insert new record on view(ORACLE) produces error

3 Answers 42 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Richard Koslik
Top achievements
Rank 1
Richard Koslik asked on 02 Dec 2010, 02:36 PM

Hello!

I have created the following view in ORACLE (10g):

CREATE OR REPLACE VIEW VW_VC as
 select vc.*,
    (select bp_s_name from vw_vcbp where vcbp_s_vc_key=vc_s_key nd vcbp_B_default=1) bp_s_name 
 from vc

The view shows all fields from the table VC and one additional field BP_S_NAME, which is only for reading. In the .rlinq file I inserted the view and changed the following properties of the column BP_S_NAME:

- Kind to "PersistentReadOnly"
- Nullable to "True"

If I make an insert onto the view directly in Oracle it works, but if I make an insert through my silverlight application there comes an error.
Meldung: Unhandled Error in Silverlight Application 
Code: 4004    
Category: ManagedRuntimeError       
Message: System.ServiceModel.DomainServices.Client.DomainOperationException: Submit operation failed validation. Please inspect Entity.ValidationErrors for each entity in EntitiesInError for more information.
   bei System.ServiceModel.DomainServices.Client.OperationBase.Complete(Exception error)
   bei System.ServiceModel.DomainServices.Client.SubmitOperation.Complete(OperationErrorStatus errorStatus)
   bei System.ServiceModel.DomainServices.Client.DomainContext.CompleteSubmitChanges(IAsyncResult asyncResult)
   bei System.ServiceModel.DomainServices.Client.DomainContext.<>c__DisplayClassd.<SubmitChanges>b__5(Object )     

Has anyone already tried to make an insert onto a database view??? How can I solve my problem?

Thanks for your help,
regards Richard Koslik



3 Answers, 1 is accepted

Sort by
0
Ady
Telerik team
answered on 07 Dec 2010, 05:01 PM
Hello Richard Koslik,

 Inserting into a view should not be a problem. Can you enable debugging and break when you get this exception? What are the contents of Entity.ValidationErrors? Do they provide some more error information?

All the best,
Ady
the Telerik team
Accelerate your learning with industry's first Telerik OpenAccess ORM SDK. Download today.
0
zongwut somwong
Top achievements
Rank 1
answered on 07 Jun 2012, 08:32 AM
I got the same trouble
0
Ady
Telerik team
answered on 11 Jun 2012, 02:11 PM
Hello zongwut,

 Can you provide some more information on the exception; can you inspect the Entity.ValidationErrors ?
Is it possible to send some sample code so that we can reproduce the exception?

Greetings,
Ady
the Telerik team
Follow @OpenAccessORM Twitter channel to be the first one to get the latest updates on new releases, tips and tricks and sneak peeks at our product labs!
Tags
General Discussions
Asked by
Richard Koslik
Top achievements
Rank 1
Answers by
Ady
Telerik team
zongwut somwong
Top achievements
Rank 1
Share this question
or