[thelist] ADOX question

David.Cantrell at Gunter.AF.mil David.Cantrell at Gunter.AF.mil
Fri Oct 11 10:43:01 CDT 2002


>Can you tell me where this version info is showing up?  Are you using
>sp_helptext to display the procs right now?  If you look through EM at the
>database itself, do you see version numbers on the names of the procedures?

Actually, that is what I found interesting. In EM I can just type
"sp_helptext add_event" and it displays the contents of the add_event SP as
expected.

But in ADOX, I have to reference the procedure like this:

	Set oCmd = oCatalog.Procedures( "add_event;1" ).Command

Even weirder, the Procedures collection returns a collection of Procedure
objects, each of which has a .Name property. Querying the .Name like this:

	For each oProc in oCatalog.Procedures
		Set oCmd = oProc.Command
		For each oParam in oCmd.Parameters
			response.write oParam.Name & "<br>"
		Next
	Next

Gets me a "No such interface supported" error. :(

But if I reference the Procedure object directly as in the first example,
passing the name explicitly, it works. Unfortunately as I said I have 250
SPs and I want this to be generic, not hard-coded with all those names. :)

Besides, since Procedure.Name returns "add_event;1" then the oProc object in
the For loop should be bound to the Procedure object for that iteration, and
the oProc.Name should return "add_event;1" (or any of the other 249 names).

I'm taking the examples pretty much straight from MSDN examples, though they
are VB and I'm converting them to VBScript, but it should be fairly
straightforward. Unfortunately I think I'm missing something in the process.

I'll look around on the web some more and see if I can come up with any
other examples/answers to show me where I'm wrong.

Thanks for your help!
-dave



More information about the thelist mailing list