New Posts New Posts RSS Feed: Schema Not Found
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Schema Not Found

 Post Reply Post Reply
Author
davidklitzke View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 14-Jun-2007
Posts: 715
Post Options Post Options   Quote davidklitzke Quote  Post ReplyReply Direct Link To This Post Topic: Schema Not Found
    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.
Back to Top
Miszou View Drop Down
Newbie
Newbie
Avatar

Joined: 14-Jun-2007
Location: United States
Posts: 19
Post Options Post Options   Quote Miszou Quote  Post ReplyReply Direct Link To This Post 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.
 
Back to Top
davidklitzke View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 14-Jun-2007
Posts: 715
Post Options Post Options   Quote davidklitzke Quote  Post ReplyReply Direct Link To This Post 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:
 
 
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.
Back to Top
Miszou View Drop Down
Newbie
Newbie
Avatar

Joined: 14-Jun-2007
Location: United States
Posts: 19
Post Options Post Options   Quote Miszou Quote  Post ReplyReply Direct Link To This Post 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!
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down