ReneLMadsen
asked on
error code 3265 Item cannot be found in the collection ... Why is this happening
Help!
Vb new boy has written a small application interfacing with a sqlserver database.
need to take data that has been added to database and output it as an xml file in order that it can be accessed by another application.
I was given the code below and told it should work - can't see why it shouldn't but then...
The application falls over at the oCmd.Properties("Output Stream") = oDom statement - error code 3265 Item cannot be found in the collection corresponding to the requested name or ordinal. I have no idea what this means.
Should the "Output Stream" statement read something other than "Output Stream"? If so, what?
Can anybody shed any light for me and tell me how to remedy the problem?
Thank you in advance
'Instance of XML Parser
Dim oCmd, sSQL, oDom
''' If MSXML 4.0 is not installed this will not work!
Set oDom = CreateObject("Msxml2.DOMDo cument.4.0 ")
Set oCmd = CreateObject("ADODB.Comman d")
oCmd.ActiveConnection = "Provider=SQLOLEDB;Data Source=(local);Initial Catalog=SCLAnodising;UID=G Croxford;P assword=xx xxx"
sSQL = "<ROOT xmlns:sql="urn:schemas-mic rosoft-com :xml-sql"> <sql:query >" & "select * from Build_Validation for xml auto</sql:query></ROOT>"
oCmd.CommandText = sSQL
oCmd.Dialect = "{5D531CB2-E6Ed-11D2-B252- 00C04F681B 71}"
oCmd.Properties("Output Stream") = oDom
oCmd.Execute , , 1024
oDom.Save "C:\Documents and Settings\Desktop\testdts.x ml"
Vb new boy has written a small application interfacing with a sqlserver database.
need to take data that has been added to database and output it as an xml file in order that it can be accessed by another application.
I was given the code below and told it should work - can't see why it shouldn't but then...
The application falls over at the oCmd.Properties("Output Stream") = oDom statement - error code 3265 Item cannot be found in the collection corresponding to the requested name or ordinal. I have no idea what this means.
Should the "Output Stream" statement read something other than "Output Stream"? If so, what?
Can anybody shed any light for me and tell me how to remedy the problem?
Thank you in advance
'Instance of XML Parser
Dim oCmd, sSQL, oDom
''' If MSXML 4.0 is not installed this will not work!
Set oDom = CreateObject("Msxml2.DOMDo
Set oCmd = CreateObject("ADODB.Comman
oCmd.ActiveConnection = "Provider=SQLOLEDB;Data Source=(local);Initial Catalog=SCLAnodising;UID=G
sSQL = "<ROOT xmlns:sql="urn:schemas-mic
oCmd.CommandText = sSQL
oCmd.Dialect = "{5D531CB2-E6Ed-11D2-B252-
oCmd.Properties("Output Stream") = oDom
oCmd.Execute , , 1024
oDom.Save "C:\Documents and Settings\Desktop\testdts.x
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.