Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Interop / December 2004

Tip: Looking for answers? Try searching our database.

Unable to create PIA for COM object with ADO

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Scott - 08 Dec 2004 19:23 GMT
I have been unable to generate the Primary Interop Assembly for a COM object.
The COM object has been developed with Visual Basic 6 by our company that
encapsulates common business functionality.  One method returns an ADO
connection (msado25.tlb).  At this time, it is not an option to re-write the
object with a .NET language, rather we want to use an interop assembly.

Using the Type Library Importer (Tlbimp.EXE) there is the following error
message: “TlbImp error: System.ApplicationException – Reference type library
‘ADODB’ does not have a primary interop assembly registered.”

I attempted to generate the primary interop assembly again with the
/reference:"C:\Program Files\Microsoft.NET\Primary Interop
Assemblies\adodb.dll" option with the same result.

I am able to create an interop assembly with the Tlbimp.Exe successfully
when the PIA is not generated (not using the /primary option).  An assembly
also created in the same directory named ADODB.DLL.  

The question is then, how does one generate a Primary Interop Assembly when
the source COM object uses ADO?

Thanks
"Peter Huang" [MSFT] - 09 Dec 2004 06:04 GMT
Hi

I think you may try to build a ADODB.DLL PIA for .net 1.1 framework
yourself. You may try to use the similar with below.
tlbimp msado15.dll /out:Interop.ADODB.dll /keyFile:MSMQ.snk

And then use  the generated PIA with your vb6 component.

You may have a  try and let me know the result.

Best regards,

Perter Huang
Microsoft Online Partner Support

Signature

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

Scott - 09 Dec 2004 19:29 GMT
Peter,

I followed your suggestion by creating a PIA for the ADO (msado25.tlb).  
With that PIA I was able to successful create a PIA for the COM object which
returned an ADO connection.

Thanks,
Scott
"Peter Huang" [MSFT] - 10 Dec 2004 02:52 GMT
Hi

I am glad that that works for you!
Cheers!

Best regards,

Perter Huang
Microsoft Online Partner Support

Signature

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

Brian R. - 20 Dec 2004 18:47 GMT
There is a PIA for MS ADO in the 1.1 framework for the 2.5 version of ADO.  
It sounds like your suggestion is that the client sign their own version and
make their own PIA.  

Is this MS's position that if a PIA is not provided by MS, customers should
create their own?

> Hi
>
[quoted text clipped - 13 lines]
> Get Secure! - www.microsoft.com/security
> This posting is provided "AS IS" with no warranties, and confers no rights.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.