Print Page | Close Window

Schema Not Found

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=330
Printed Date: 12-Jun-2026 at 1:26am


Topic: Schema Not Found
Posted By: Miszou
Subject: Schema Not Found
Date Posted: 26-Jul-2007 at 8:36am
I am trying to use the Object Mapping Tool to create a stored-procedure backed entity.
 
However, every time I select the sproc from the "Add Unmapped Tables/Stored Procedures" window in the Object Mapping Tool, the entity is added to the class list with a red exclamation mark next to it, that reads "schema not found" and the class detail is unavailable.
 
This only appears to happen for some sprocs - others I can add without any problem.
 
I can't seem  to find any differences between sprocs that work and those that don't. Does anyone have an idea of what migh tbe going on here?
 
Thanks!



Replies:
Posted By: davidklitzke
Date Posted: 26-Jul-2007 at 9:14am
There was another customer who had the very same problem, and I responded to him on the Forum:
 
http://www.ideablade.com/forum/forum_posts.asp?TID=279 - http://www.ideablade.com/forum/forum_posts.asp?TID=279
 
The Object Mapper looks at your stored proc, and tries to figure out its input and output parameters.  If it can't figure this out, it reports "Schema Not Found".  Characteristics of your stored proc that will cause the Object Mapper not to understand the output shape are (among other things):
 
(1) Temporary Tables
(2) Dynamic SQL
(3) HAVING clauses
 
The workaround is straightforward.
 
(1) Create any stored proc that gives the right output shape
(2) Map the Stored Proc query using the Object Mapper
(3) Replace the "dummy" stored proc with the real one
(4) When you use the Object Mapper, you must be careful not to regenerate entities.  Otherwise, you will get the same "Schema Not Found" error.


Posted By: Miszou
Date Posted: 26-Jul-2007 at 9:54am
Thanks for your quick reply - the problem was exactly as you described.
 
My sproc contained references to user-defined functions as well as temporary tables. After commenting out these items and re-running the object mapper, I was able to succcessfully generate the entity. I then uncommented the necessary parts of the sproc and everything seems to be fine.
 
I'm curious, is this an issue with DevForce or is it something that's out of your hands in SQL Server? And if you can, do you plan on fixing it at some point? It's not a show-stopper by any means, but it could get irritating after a while, every time you open the object mapper...
 
Thanks again for your help.
 


Posted By: davidklitzke
Date Posted: 26-Jul-2007 at 9:14pm
I'll admit that we might be able do a somewhat better job here, but DevForce will never be able to process all the different variants of Stored Procedure queries (especially when it comes to non-SQL Server Stored Procedures).  We could expend a lot of effort in this area without being able to make substantial improvements, so I think we will always need this workaround.
 
Hopefully, this won't be such an issue in the future with LINQ.



Print Page | Close Window