Daz77 wrote:
Hi
Thank you for the feedback.
The reason for there being no entities/tables is that we are only using LLBLGen to retrieve SP's from our clients database on their server. Regarding the SP, the reason that it would fail if you run in on your SQLManager is that it references other databases on the clients server. When executing this SP on the clients server then all is fine. I unfortunately only have access to the database that contains these SP's only. I apologise for this as in my haste last week I totally forgot about the above mentioned regarding the SP's.
The error given in the application output window shows that the 'execution' of the procedure gives the error in the convert. As the parameter is an nvarchar, the driver will pass an empty string as the parameter value, as it can only assume it is a string parameter. The first thing you do in the proc is convert a guid from the string, which fails as the string is an empty string and thus not a valid guid. As this fails, the proc doesn't return a resultset and therefore the driver skips it.
The problem with this procedure is however that for 1 particular input it returns 2 resultsets, while in the other situations it returns 1. This won't work with the designer, as it won't specify the input necessary to produce 1 or 2 resultsets.
So you should manually specify '2' as the # of resultsets by right-clicking the procedure in catalog explorer and then select 'Set number of resultsets'. If you don't, you'll get 0 or as I see you already set it to 1.
If the SP parameter was not to be null, would this may resolve the issue? We also have the new version of 3.5 for LLBLGen, would this perhaps resolve the issue if I was to upgrade (infact we will be upgrading all our current projects anyway)?
Regards,
No, the problem will be the same as your proc chokes on the input the driver passes as parameter value (""), which fails in the convert. As I described above, it'll be problematic anyway to get a typed resultset from this, so use the untyped resultset feature, i.e. set the # of resultsets to 2.