We have a custom dll that uses an ADODB.Stream object to
convert xml back to a recordset (code is below):
---------------------------------------------------
Public Function RSOpenFromXML(ByVal strRSXML As String) As
ADODB.Recordset
Dim rs As ADODB.Recordset
Dim objStream As ADODB.Stream
On Error GoTo Trap
strRSXML = Replace(strRSXML, "<![CDATA[", "")
strRSXML = Left(strRSXML, Len(strRSXML) - 3)
Set objStream = New ADODB.Stream
objStream.Open
objStream.WriteText strRSXML
objStream.Position = 0
Set rs = New ADODB.Recordset
rs.Open objStream
Set RSOpenFromXML = rs
Exit Function
Trap:
If Not objStream Is Nothing Then Set objStream =
Nothing
If Not rs Is Nothing Then Set rs = Nothing
Err.Raise Err.Number, Err.Source & vbCrLf
& "RSOpenFromXML", Err.Description
End Function
--------------------------------------------------
Here's the problem: We call this dll from two different
standard exe's. In the case of the 1st EXE, everthing
works great on all installed machines. However, in the
case of the second EXE, we get an error on the line "Set
objStream = New ADODB.Stream" (see code above) The error
is (429) ActiveX component can't create object.
The interesting thing is this doesn't occur on all
machines, and only occurs when certain users are logged-
on. Does the stream object require specific file or
registry access rights?(which may change based on user).
Other Info: MDAC 2.6 RTM, XMLParser 3 SP1.
Thanks in advance.
Randy,
Are you using DCOM (the DLL is on another machine)?
If so, are you using COM+ to host the DLL?
Note, I've not run into a permissions problem with the ADO Stream object.
--
Thanks,
Carl Prothman
Microsoft Visual Basic MVP
http://www.able-consulting.com
P.S. The DOM approach seems more logical anyway -- Use a
DOM to handle the XML to adodb.recordset translation --
makes sense to me.
>.
>