Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

temp tvp types #302

Merged

Conversation

vasily-kirichenko
Copy link
Contributor

No description provided.

@vasily-kirichenko
Copy link
Contributor Author

@davidoptima Thanks!

@smoothdeveloper smoothdeveloper mentioned this pull request May 20, 2018
@erlis
Copy link

erlis commented Jul 27, 2018

Hi guys,

Is this included in 1.8.6 ?

@erlis
Copy link

erlis commented Jul 27, 2018

I see it is, but this doesn't fix call a stored procedure that uses temp tables. Right?

@smoothdeveloper
Copy link
Collaborator

@erlis such procedures will always require using dynamic "exec sp_execultesql" along with "with result sets ..." to describe the shape of result set explicitly.

Though, I haven't tried to issue call to a procedure not having that defined but leveraging the temp table declaration with this new feature in a custom provided SqlCommand, I suspect this might work.

@erlis
Copy link

erlis commented Jul 27, 2018

What about modifying the ProgrammabilityProvider so we can pass the "with result sets..." to the stored procs that need that information?

I'm thinking something like providing a map with StoreProcName, ResultSet for those that fail.

About this:

Though, I haven't tried to issue call to a procedure not having that defined but leveraging the temp table declaration with this new feature in a custom provided SqlCommand, I suspect this might work.

What if the proc uses 2 or more temp tables?

This is a big restriction because temp tables are used (at least in my stored procs) for performance optimizations.

Let me know what do you think about my idea and I can fork and work on this change...

Thanks!

@smoothdeveloper
Copy link
Collaborator

What about modifying the ProgrammabilityProvider so we can pass the "with result sets..." to the stored procs that need that information?

What if the proc uses 2 or more temp tables?

I generally do that inside the stored procedure itself, AFAIU it doesn't preclude usage of several temp tables, but maybe I'm mistaken, could you share a sample SQL snippet + TP declaration to check the issue further?

I might not have faced the issue because I'm using dynamic sql statements pretty much any time temp tables are involved in my case so far but I start to see that you can have static sql and temp tables and no place to use with result sets.

The way you propose to solve the issue is reasonable, let's gather more feedback in #308.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants