Click to See Complete Forum and Search --> : ADO version 2.5 and XML


Bennett
03-21-2001, 06:56 PM
Hello, I am trying to take advantage of ADO 2.5 XML features but I am unable
to due to what I suspect to be the wrong version of ADO. I am attempting
to do this from an Active server page without a project so I cannot set the
project reference to ADO 2.5. Below is the code how I am creating my server
object. I cannot create the ADODB.Stream object. Also, I did check our
server and we have the dll loaded for 2.5.

I would appreciate any assistance.
Thanks in advance.
--------------------------------------------------------------------
set objConn = server.CreateObject("ADODB.Connection")
set objRS = server.CreateObject("ADODB.Recordset")

'get tasks
strSQL = "exec sp_TasksSelect " & UserID

objConn.Open Application("UserWrite_ConnectionString")
objRS.ActiveConnection = objConn
objRS.Open strSQL, objConn, adOpenForwardOnly

if not objRS.bof and not objRS.eof then
streamTasks = server.CreateObject("ADODB.STREAM")
objRS.Save streamTasks, adPersistXML
objRS.Save "mypath\xmltest.xml", adPersistXML