Print Page | Close Window

Specified cast is not valid

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce Classic
Forum Discription: For .NET 2.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=1552
Printed Date: 23-Apr-2025 at 6:03pm


Topic: Specified cast is not valid
Posted By: msgetiren
Subject: Specified cast is not valid
Date Posted: 10-Nov-2009 at 1:55am
Hi,
I have a problem. I use Oracle DB so that, I used Microsoft OLE DB Provider For Oracle. When I try to add class from unmapped classes and stored procedures' form, it gives me an error:"Specified cast is not valid". How can I fix this problem.



Replies:
Posted By: davidklitzke
Date Posted: 10-Nov-2009 at 12:28pm
You will need to use the Oracle Native Provider.  See Developer's Guide around page 229.

Oracle Stored Procedure Queries

We can map a business object directly to a Microsoft SQL Server stored procedure but we cannot map a business object to an Oracle stored procedure because the Object Mapping tool cannot discover the schema for Oracle stored procedures.

Fortunately, we can use an Oracle stored procedure to return business objects by invoking that procedure in a Stored Procedure Query. The target business object can be any entity resulting from the Object Mapping exercise.

If there is no such entity, we can manufacture a "Fictive Entity Class" as described earlier in this section.

Querying Example

DevForce supports Oracle stored procedures via Oracle Ref Cursors. An example stored procedure and its corresponding DevForce code follow




Print Page | Close Window