Solved

ActiveX component can't create object

Posted on 2002-06-03
7
699 Views
Last Modified: 2012-06-27
The following code cause an "ActiveX component can't create object" on the "set en=rdoenvironments(0)" line.
I am running this on a W 2000 Advanced server.

Dim Cn As New rdoConnection
    Dim En As rdoEnvironment
    Dim Qd As New rdoQuery
    Dim Rs As rdoResultset
    Dim Conn As String
    Dim tempcnt As Integer
    Dim strDate, strQd$, strQd1$
       
       Command1.Caption = "Start"
       Conn = "UID=scott;PWD=tiger;dsn=o9ia;SERVER=o9ia;"
       
       Set En = rdoEnvironments(0)
       En.CursorDriver = rdUseOdbc
       With Cn
           .Connect = Conn
           .CursorDriver = rdUseOdbc
           .EstablishConnection rdDriverNoPrompt, False
       End With

       Set Qd.ActiveConnection = Cn

       Qd.SQL = "{call gjb_testdate1(?,?)}"
       Qd(0).Direction = rdParamInput
       Qd(1).Direction = rdParamOutput
       Qd(0).Type = rdTypeDATE
       
       Qd(0) = CDate("1/1/1900")
       Qd.Execute
       strQd = Mid(Qd(1), 12)
       strQd1 = Mid(Qd(1), 1, 11)
       Debug.Print "For the date you entered: " & strQd1 & vbCrLf & strQd
       MsgBox "For the date you entered: " & strQd1 & vbCrLf & strQd

   End Sub

   
I tried register and rdo.rd.... and still get "429". The procedure is try to call an oracle procedure.
 

0
Comment
Question by:MrCrawfish
7 Comments
 
LVL 2

Expert Comment

by:chops123
ID: 7053122
This error is encountered when the Active-X component you have referenced is not registered on your machine.

If you are using a self made Active-X Component,you need to register the same on you PC.

Do the foll:

Click on Start-Run and type the following.

regsvr32 c:\foldername\myComponent.dll

This will register the DLL in your PC.

Rgds
KC
0
 

Expert Comment

by:basha_ahmad
ID: 7053374
Mr. CrawFish...

    Check out whether rdo library has been registered on
your pc. if it is not then get it registered.

    The DLL is MSRDO20.dll which you can get without a prob.

The registration process is same as chops has said.

bye
basha
0
 
LVL 1

Accepted Solution

by:
toys032498 earned 50 total points
ID: 7053887

Use Option Explicit

You have

Dim En As rdoEnvironment

Set En = rdoEnvironments(0) ' You spelled it wrong -> added a "s"
0
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 
LVL 5

Expert Comment

by:rpai
ID: 7054625
0
 

Expert Comment

by:raja_velpuru
ID: 7054652
Are u writing VB or ASP?

If it is VB,
u have to use:

Dim en As RDO.rdoEnvironment
Set en = rdoEngine.rdoEnvironments(0)
0
 
LVL 2

Expert Comment

by:chops123
ID: 7055633
From the code,MrCrawfish seems to be using VB.

The only issue is DLL registration.Once registered,you will be through with your program

Rgds
KC
0
 
LVL 4

Expert Comment

by:Wakie
ID: 9142926
It appears this question has been abandoned.

I will leave a recommendation in the Cleanup topic area that this question will be:

- Question PAQ'd and points to toys -

Please leave any comments here within the next seven days.

DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

Wakie,
EE Cleanup Volunteer.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question