Re: Ado 2.6



I hope your CreateObject is a typo, because you've missed the quotes out.
Assuming it's not ...

If you have a reference to the tlb, use this

Set oRec = New ADODB.Recordset

if you are using late binding, use this

Set oRec = CreateObject("ADODB.Recordset")

Dan


sparvathi123@xxxxxxxxx wrote on 8 Feb 2006 15:03:58 -0800:

The reference is showing up in VB which refers to msad026.tlb. But when
I run it, CreateObject(ADODB.Recordset) throws automation error.

Richard Mueller wrote:
Parvathi wrote:

I am working on a VB component which uses ADODB.Recordset. Even though
ADO 2.6 and MDAC 2.6 are installed in the machine, the registry
doesn't have any class name for ADODB.Recordset. Hence the Recordset
creation fails. If anyone have faced similar problem and know a
solution please email me. Thanks in advance.

Note: I have .NET also installed in my machine.

Hi,

If MDAC is installed you should be fine. If your are using VB or VB.NET
you probably need to add a reference to "Microsoft ActiveX Data Objects
2.6 Library", which refers to msado26.tlb. In .NET I believe it is on the
"COM" tab when you add references. When you expand references in Solution
Explorer you should see ADODB. In VBScript you don't need any references.

--
Richard
Microsoft MVP Scripting and ADSI
Hilltop Lab - http://www.rlmueller.net


.



Relevant Pages

  • Re: MDAC 2.7 with Win XP SP2
    ... This is not an MDAC issue or a COM issue, ... resolve the references but when I recompiled the solution I received ... When I open the same project on my Win XP SP2 machine, ...
    (microsoft.public.data.ado)
  • Re: Suddenly VB6 database program quit working - HELP!!!
    ... References are OK. ... I tried another project that had been working and it fails the same way. ... I haven't installed anything for awhile except MDAC 2.8 and possibly ... >¤ It fails on the Set statement. ...
    (microsoft.public.vb.database)
  • Re: MDAC 2.8 Update Problem
    ... If you upgraded to MDAC 2.8 and Component Checker shows that installation is ... They start with 2.80 and Component Checker find the Version ... I want to upgrade this references to 2.7 ...
    (microsoft.public.data.ado)
  • Re: Ado 2.6
    ... It sounds like MDAC should be re-installed. ... Microsoft MVP Scripting and ADSI ... ADO 2.6 and MDAC 2.6 are installed in the machine, the registry ... When you expand references in Solution ...
    (microsoft.public.data.ado)
  • Re: Ado 2.6
    ... If MDAC is installed you should be fine. ... probably need to add a reference to "Microsoft ActiveX Data Objects 2.6 ... When you expand references in Solution Explorer ...
    (microsoft.public.data.ado)