Is it possible to create a stored procedure that can call a function/generate C# code? I already know how to call a stored procedure from C# (I was surprised at how easy it is, I thought it'd be much more complex) but what I'm trying to do is have a stored procedure generate code based on certain information from SQL, but my problem for not being able to just use the information from SQL is I have to bounce it through iTextSharp to generate a report.
So if anyone knows if it's possible (And a tutorial/example, that'd be awesome) could they please shed some light on this? Again to just make it clear, I am hoping to use a stored procedure to either call a C# function or generate C# code on the fly in hopes of generating a PDF with iTextSharp.
Thanks!
Side note : As I was adding tags, I saw stored-functions, I don't have much experience but would they possibly work for what I'm looking to do as well?