亚音速,设置 useSPs=“true"似乎不起作用.未生成 SP [英] Subsonic, setting useSPs="true" doesn't seem to work. SPs aren't being generated
问题描述
我正在使用亚音速,我对它相当陌生.今天是我第一次需要和它一起使用存储过程.
I am using subsonic, I'm reasonably new at it. Today is the first time I need to use stored procedures with it.
我在 webconfig 中的 provider 行如下:
My provider line in the webconfig is as follows:
我使用了两个指向两个不同数据库的提供程序,其中另一个不调用 SP.
I am using two providers pointing at two different databases, where the other one isn't calling the SPs.
当我生成时,我得到了所有的表和类存储过程,但它是空的!所以当我做SP的时候....在代码中没有要显示的类.
When I generate, I am getting all the tables and the class storedprocedures's but it is empty! So when I do SPs. ... in code there are no classes to display.
有人知道这里发生了什么吗?
Does anyone know what's happening here?
更新:
如果我在其他提供程序上设置 UseSps="True" .. 是否有效?
If I set UseSps="True" on my other provider.. it does work?
数据库位于完全不同的服务器上..
The databases are on completely different servers..
贝克
推荐答案
适合任何遇到此问题的人..我知道是什么导致了它(无论如何在我的情况下).. 需要重写核心代码来修复..
Right- for anyone who's got this problem.. I know what's causing it (in my case anyway).. will need a core code rewrite to fix..
如果你去这里显示了生成 Sps 的来源.转到第 1745 行
If you go here it shows the source for generating the Sps. Go to line 1745
如果我在 SQL Server 中运行此过程,则会收到此错误:
If I run this procedure in SQL Server I get this error:
Cannot sort a row of size 8098, which is greater than the allowable maximum of 8094.
这是因为我使用的 DB 中的存储过程绝对庞大,所以当它订购时,它们对于行来说太长了.删除核心代码中的 order by 将修复该错误,但我不知道是否需要??
Its because the stored procedures in the DB I am using are absolutely massive, so they are too long for the row when it orders by. Removing the order by in the core code will fix that error, but I don't know if it's needed??
我要把它作为一个问题提交.
I am going to submit it as an issue.
这篇关于亚音速,设置 useSPs=“true"似乎不起作用.未生成 SP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!