Need to read the contents of SP
Tg has guessed(?) it right. Probably I should have made it clear earlier.
I will explain why I want to read the contents of SP.
Generally when SP has parameters, the way is to keep adding the parameters in VB.Net code and then call the SP through ADO.Net. This would mean two things. Firstly the number of parameters mentioned in SP should match with what is being added in DotNet code. Secondly it should be in proper order. Otherwise we are going to end up with errors.
I felt that in order to avoid such errors, I would like to read the contents of the SP in text form, from where I will be able to extract the parameters portion only and writing a loop in Dotnet wherein I can ensure that the same number of parameters in proper order is added.
It may sound crazy but I wanted to make sure that there is a perfect match between SP and dot net code and I felt that this was the way. If there is a better way, please do enlighten me.
In the absence of knowing how to do it, currently what I am doing is to mark all the SPs in the database ( through enterprise manager) and copy and paste it in one single stroke into notepad and use the notepad text file to do this task. But then there can always be a disconnect between the sp contents and the notepad contents during development phase. Hence the request for a dynamic solution.
I hope the requirement is clear and as I mentioned earlier if there is a better way I would be glad to learn.
Thanks and Best Regards
Varadarajan R