Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ADODB.Stream -- Can't Create Object Error

412 views
Skip to first unread message

Randy McKee

unread,
Aug 15, 2001, 6:45:04 PM8/15/01
to
Strange error. Let me know if you've seen anything like
this, and if you were able to fix it:

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.

peter

unread,
Aug 15, 2001, 8:03:16 PM8/15/01
to
Hi Randy,
I think you should install MDAC 2.5 or over to your all machines. Because
the old MDAC didn't support ADO Stream property.
Peter
"Randy McKee" <Ra...@HersheyTech.com> wrote in message
news:1378101c125db$eccd2f20$9be62ecf@tkmsftngxa03...

Randy McKee

unread,
Aug 16, 2001, 11:21:38 AM8/16/01
to
Peter, I'm using MDAC 2.6 RTM (it's newer than 2.5).
>.
>

Carl Prothman

unread,
Aug 16, 2001, 2:05:58 PM8/16/01
to
"Randy McKee" <Ra...@HersheyTech.com> wrote
> Here's the problem: We call this dll from two different
> standard exe's. In the case of the 1st EXE, everything
> 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.
>

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

Randy

unread,
Aug 16, 2001, 6:44:53 PM8/16/01
to
Well, I found an article on MSDN that uses an xml DOM to
pass the XML to a recordset (instead of using the
Stream). As the Stream was causing problems, I'm hopefull
the DOM approach will solve the issue.

P.S. The DOM approach seems more logical anyway -- Use a
DOM to handle the XML to adodb.recordset translation --
makes sense to me.

>.
>

0 new messages