May 8, 2005 at 5:14 am
May 9, 2005 at 1:50 am
And what part of that process are you having problems with? We can't help if we don't know what the problem is
May 9, 2005 at 7:31 am
I'm going to take a stab at that you are trying to pass your global variables to a stored procedure that processes them as a FOR XML EXPLICIT select. From Active-X, you would call your proc like this:
'*** Build the XML Output Stream
Set objCommand = CreateObject("ADODB.Command")
Set objStream = CreateObject("ADODB.Stream")
objStream.Open
Set objCommand.ActiveConnection = objConnection
objCommand.Dialect = "{C8B522D7-5CF3-11CE-ADE5-00AA0044773D}"
objCommand.CommandType = adCmdStoredProc
objCommand.CommandText = "MySPName @myparam=" & DTSGlobalVariables("mygvname").value
objCommand.Properties("Output Stream") = objStream
objCommand.Properties("XML Root") = "RootTag"
objCommand.Execute , , 1024 ' adExecuteStream
Then you can save it with the following set of commands:
'*** Write the XML Output File
Dim XMLString
XMLString = objStream.ReadText (-1) ' adReadAll
objReportFile.Write( XMLString ) ' Write XML File
XMLString = ""
objReportFile.Close ' Close File
objStream.Close
Set objStream = Nothing
Set objCommand.ActiveConnection = Nothing
Set objCommand = Nothing
Not sure if that is what you are after... but hope it helps someone.
-Mike Gercevich
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply