Using a variety of sources I put together the following script ...
Dim myStream, myConnection, myCommand
Set myStream = CreateObject("ADODB.Stream")
Set myConnection = CreateObject("ADODB.Connection")
Set myCommand = CreateObject("ADODB.Command")
'
myConnection.Open "Provider=SQLOLEDB;Integrated Security=SSPI;" & _
"Persist Security Info=False;Initial Catalog=DSIPAR;Data Source=.\DSIDATA"
MsgBox(myConnection.State)
MsgBox(myConnection.Provider)
MsgBox(myConnection.Version)
myCommand.ActiveConnection=myConnection
myCommand.CommandText="SELECT itemsgt,item FROM NIFItem"
MsgBox(myCommand.CommandText)
myStream.Open
myCommand.Properties("Output Stream") = myStream
'myCommand.Properties("xml root") = "root"
myCommand.Execute ,,adExecuteStream
myStream.Position=0
MsgBox(myStream.Charset)
MsgBox(myStream.Size)
MsgBox(myStream.Type)
myStream.Charset="ISO-8859-1"
Dim strxml
strxml = myStream.ReadText
MsgBox (strxml)
Sorry about all the message box but I am trying to debug ... anyway I can run the script, I can see the query execute on my SQL server instance, but nothing is ever returned to the output stream. I have checked the code multiple times and see nothing wrong.
Thanks for any ideas.