![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Greetings, We have a business requirement to somehow extract the SP header from syscomments where available. This is done from a COM+ component using ADO in order to verify whether SP arguments are specified correctly from a client application, primarily during integration testing. We know to use sp_helptext, but there is a slight issue... Parsing around comments is not a problem using block (/* ... */) commenting style, however single line (-- ...) comments may pose a problem. It appears as though syscomments spans such comment lines across table rows. So we end up with something like this: ... -- blah blah blah (exceeds 255 characters) blah blah blah (remaining comment ... This could present some challenges. Is there a safe (and sane) method of determining when this is the case and making the appropriate adjustments to the COM+ code? If we can get past this "little" issue then I am fairly confident we can parse the remainder of the SP header for the desired argument information. Any insight anyone can offer wouldb e much appreciated. Thanks, Michael Powell |
#3
| |||
| |||
|
#4
| |||
| |||
|
|
Wow, you are correct. This is about as direct a route as one can expect querying for parameter information. One thing, however, how do we get at information such as the default arguments? This doesn't appear to be available from INFORMATION_SCHEMA.PARAMETERS? |
#5
| |||
| |||
|
#6
| |||
| |||
|
#7
| |||
| |||
|
#8
| |||
| |||
|
|
We may pursue the SMO option (research on the topic pending). Back to our original query though... Are there any practical ways to address the above scenario? Short of assuming that the code must be good syntactically or it wouldn't have been applied to the syscomments table. If that is true, then any tokens which fall outside the scope of available SQL tokens are probably invalid and belong to the comment. Then we're looking for the first token which appears with a '@' and which is followed by a valid type token? (Thinking out loud...) |
#9
| |||
| |||
|
|
Please forgive my ignorance, the only reference I see to SMO is in the MS SOAP toolkit. Is there a primer section that could introduce me to it? Something that explains what it is, how to begin using it, etc, etc? From Visual Studio .NET (2002) I found the references. From VS .NET 2003 I found no such references. Or maybe I'm missing it? |
![]() |
| Thread Tools | |
| Display Modes | |
| |