Stored Procedure Result Sets not being found

Posts   
 
    
ElQueso avatar
ElQueso
User
Posts: 27
Joined: 08-Oct-2005
# Posted on: 23-Dec-2019 05:52:54   

I'm using an older version of the designer, 4.2 (Final). It seems to be a designer issue that I'm having.

I copied my work files from my desktop to my laptop in order to work on the road for awhile. This includes my SQL Server (2012) database files, Visual Studio (2012) project files, Gen Pro project files, etc. I have had zero problems with my SQL Server setup, VS setup, etc. I've been working for a week, testing, connecting with the DB, etc.

Today I had to create a new view. Ran my script in SQL Server, went to the Gen Pro designer to refresh the relational model and added the typed view to my project list of typed views (not based on a SP result set, this doesn't seem to have anything to do with my problem, it's just when I ran into the problem I'm having). The post-refresh dialog has errors (as noted below) for about 10 of my SP result sets.

The problem is that the designer doesn't recognize a number of results sets from stored procedures in my DB. Not all of them have this issue, but the ones that do seem to be some of the latest that I have added over the last 6-7 months or so. The errors are due to typed views and fields mapped on to result sets that are not found after the refresh.

Typical error generated during the refresh:

"Typed view 'ForeignTariffSuggestionsResult' is no longer mapped to a target as target storedprocedureresultset 'dbo.GetForeignTariffSuggestions.Resultset1' was not found in the catalog"

That's what shows up in the post-refresh dialog. Then obviously I have that one and one for every field that was in the result set in the validation errors for the project if I got to generate the code files. On the right of the designer, int he schema, the stored procedures are shown, but with (0) results sets.

I thought this might have something to do with execute permissions or something on the procedures and the designer was unable to execute to get the result sets or something. I've examined the effective permissions of the objects in question for my Windows 10 user and they seem fine. I'm using Windows Authentication in both MS SQL Server Management Studio (where I run my scripts generally) and in Gen Pro, and in my web pages the connection string is set to use integrated security. All access to tables, views and stored procedures work correctly with my Windows 10 login credentials in Management Studio and the code using Gen Pro to access the database objects in my C# projects

I even tried dropping and re-creating a couple of the stored procedures. No change whatsoever in those SP result sets in teh designer after I refresh the relational model.

The only thing that may be a little "off" is that I didn't install Gen Pro, but rather copied the Solutions Design folder and all sub-folders and files (including my license file) from my desktop to my laptop. I couldn't find the 4.2 install (it's been a few years since I installed it, obviously) and I couldn't find a means to download it from your site. I remember I used to do that with the older 2.6 version and when I copied it over and everything seemed to work at the time of setting up my laptop, I assumed I was going to be fine.

I can't think of anything else to do and I'm in a bit of a pickle with my work at this point. Any ideas what stupid thing I may have done and how to resolve it?

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 23-Dec-2019 09:16:21   

From your remarks I don't think you did anything out of the ordinary. Could you check what's being reported in the application output pane in the designer? It might be executing the stored proc (this is done inside a transaction which is rolled back, the procs are executed with parameters having default values) fails and the resultset couldn't be determined because of that (and it will report that).

Downloading an installer can be done from the 'My account' menu after you've logged in.

Frans Bouma | Lead developer LLBLGen Pro
ElQueso avatar
ElQueso
User
Posts: 27
Joined: 08-Oct-2005
# Posted on: 23-Dec-2019 17:43:43   

OK, yeah, I was stupid on 2 counts. It was late last night when I was doing this and I completely forgot about the tabs on the bottom of the designer. I use the warnings/errors, obviously, but forgot that was where you also have the application log.

That, of course, showed me exactly what the problem was. I can't believe I didn't think of this and am quite embarrassed. I use CLR DLLs in a few of my stored procedures. Since this is a new installation of SQL Server on my laptop, I spaced out on enabling the use of CLR.

Apparently the couple of procedures I tested in Management Studio didn't use the CLR DLLs, therefore didn't generate the error that occurred during refreshing in Gen Pro. The only strange thing is that I swear I tested at least one of the procedures that did include CLR functions, but like I said I was pretty tired and must not have.

As always, your product was spot-on. I knew I'd done something idiotic, just couldn't see it until interaction with someone else!

Thanks for your time, and sorry it was wasted.

Walaa avatar
Walaa
Support Team
Posts: 14950
Joined: 21-Aug-2005
# Posted on: 23-Dec-2019 19:40:01   

It's ok, we all have these kind of nights. Thanks for the feedback.