[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.interop

Best way to create ActiveX for Access 2000 in (vb).net

hagipro

2/26/2007 10:45:00 AM

Hi,

I'm currently expanding the capability of an Access 2000 database for
a customer who's limited by the "regime" of it's IT-department.

The client wishes to do things in his Access 2000 (with VBA) that are
easily done in (vb).NET.

I have finished an ActiveX component that works well when tested in a
VB.NET 2003 environment using 1.1 framework (client has 1.1
installed).

I've got register class and unregister class (inprocserver32 etc.) and
when compiled, on the same machine it works wonderfully well in Access
2003. However, the customer uses Access 2000 and Windows 2000.

So I've created a virtual machine running Windows 2000 with Access
2000.

My question now is (application has strong name) how would I implement
this the right way. I've used Regasm and I've checked "register for
COM interop". I've placed the .dll and .tlb in the same folder as
MSACCESS.EXE and still I'm experiencing difficulties. Like Access
mentioning it's not registered properly, or when it finally works the
next time you enter the form it's says something about the ActiveX
component containing no control.

I registered the dll like this:

[path to]\regasm /codebase myactivex.dll

And also without /codebase.

Do I need more ? Do I need to go about this from a different angle ?
Please advice !

Kind regards,
Martin.

3 Answers

Patrick Steele

2/26/2007 1:32:00 PM

0

In article <1172486722.969042.117400@v33g2000cwv.googlegroups.com>,
hagipro@gmail.com says...
> Hi,
>
> I'm currently expanding the capability of an Access 2000 database for
> a customer who's limited by the "regime" of it's IT-department.
>
> The client wishes to do things in his Access 2000 (with VBA) that are
> easily done in (vb).NET.
>
> I have finished an ActiveX component that works well when tested in a
> VB.NET 2003 environment using 1.1 framework (client has 1.1
> installed).
>
> I've got register class and unregister class (inprocserver32 etc.) and
> when compiled, on the same machine it works wonderfully well in Access
> 2003. However, the customer uses Access 2000 and Windows 2000.
>
> So I've created a virtual machine running Windows 2000 with Access
> 2000.
>
> My question now is (application has strong name) how would I implement
> this the right way. I've used Regasm and I've checked "register for
> COM interop". I've placed the .dll and .tlb in the same folder as
> MSACCESS.EXE and still I'm experiencing difficulties. Like Access
> mentioning it's not registered properly, or when it finally works the
> next time you enter the form it's says something about the ActiveX
> component containing no control.

Have you applied all of the proper attributes and things to make sure
your .NET object is exposed to COM cleanly? See:

http://www.15seconds.com/issue/...

--
Patrick Steele
http://weblogs.asp.n...

hagipro

2/26/2007 9:47:00 PM

0

On 26 feb, 14:32, Patrick Steele <patr...@mvps.org> wrote:
> In article <1172486722.969042.117...@v33g2000cwv.googlegroups.com>,
> hagi...@gmail.com says...
>
>
>
> > Hi,
>
> > I'm currently expanding the capability of an Access 2000 database for
> > a customer who's limited by the "regime" of it's IT-department.
>
> > The client wishes to do things in his Access 2000 (with VBA) that are
> > easily done in (vb).NET.
>
> > I have finished an ActiveX component that works well when tested in a
> > VB.NET 2003 environment using 1.1 framework (client has 1.1
> > installed).
>
> > I've got register class and unregister class (inprocserver32 etc.) and
> > when compiled, on the same machine it works wonderfully well in Access
> > 2003. However, the customer uses Access 2000 and Windows 2000.
>
> > So I've created a virtual machine running Windows 2000 with Access
> > 2000.
>
> > My question now is (application has strong name) how would I implement
> > this the right way. I've used Regasm and I've checked "register for
> > COM interop". I've placed the .dll and .tlb in the same folder as
> > MSACCESS.EXE and still I'm experiencing difficulties. Like Access
> > mentioning it's not registered properly, or when it finally works the
> > next time you enter the form it's says something about the ActiveX
> > component containing no control.
>
> Have you applied all of the proper attributes and things to make sure
> your .NET object is exposed to COM cleanly? See:
>
> http://www.15seconds.com/issue/...
>
> --
> Patrick Steelehttp://weblogs.asp.n...

Hi Patrick,

Thanks for replying. Interesting stuff you've mentioned there. Yes,
it's exposed
cleanly as far as I can see.

It's odd. I simply use regasm /codebase myactivex.dll and the Access
2000
database can't do anything with it (complaining it's not registered,
although
showing up in the ActiveX list of registrered controls).

However, as mentioned, it's working perfectly in my Access 2003
database
but that's perhaps because my Visual Studio .NET resides on that
computer.

Just for fun of it, I copied this Access 2003 database (Access 2000
format) to
the virtual machine having the problem.

It says (translated sorry) "This controlelement doesn't contain an
object". The
form shows an empty (white) control. I close the form, re-open it in
design and
voila, no problem at all. It even exposes my properties nicely.

Martin.

hagipro

2/27/2007 4:09:00 PM

0

On 26 feb, 22:46, hagi...@gmail.com wrote:
> On 26 feb, 14:32, Patrick Steele <patr...@mvps.org> wrote:
>
>
>
> > In article <1172486722.969042.117...@v33g2000cwv.googlegroups.com>,
> > hagi...@gmail.com says...
>
> > > Hi,
>
> > > I'm currently expanding the capability of an Access 2000 database for
> > > a customer who's limited by the "regime" of it's IT-department.
>
> > > The client wishes to do things in his Access 2000 (with VBA) that are
> > > easily done in (vb).NET.
>
> > > I have finished an ActiveX component that works well when tested in a
> > > VB.NET 2003 environment using 1.1 framework (client has 1.1
> > > installed).
>
> > > I've got register class and unregister class (inprocserver32 etc.) and
> > > when compiled, on the same machine it works wonderfully well in Access
> > > 2003. However, the customer uses Access 2000 and Windows 2000.
>
> > > So I've created a virtual machine running Windows 2000 with Access
> > > 2000.
>
> > > My question now is (application has strong name) how would I implement
> > > this the right way. I've used Regasm and I've checked "register for
> > > COM interop". I've placed the .dll and .tlb in the same folder as
> > > MSACCESS.EXE and still I'm experiencing difficulties. Like Access
> > > mentioning it's not registered properly, or when it finally works the
> > > next time you enter the form it's says something about the ActiveX
> > > component containing no control.
>
> > Have you applied all of the proper attributes and things to make sure
> > your .NET object is exposed to COM cleanly? See:
>
> >http://www.15seconds.com/issue/...
>
> > --
> > Patrick Steelehttp://weblogs.asp.n...
>
> Hi Patrick,
>
> Thanks for replying. Interesting stuff you've mentioned there. Yes,
> it's exposed
> cleanly as far as I can see.
>
> It's odd. I simply use regasm /codebase myactivex.dll and the Access
> 2000
> database can't do anything with it (complaining it's not registered,
> although
> showing up in the ActiveX list of registrered controls).
>
> However, as mentioned, it's working perfectly in my Access 2003
> database
> but that's perhaps because my Visual Studio .NET resides on that
> computer.
>
> Just for fun of it, I copied this Access 2003 database (Access 2000
> format) to
> the virtual machine having the problem.
>
> It says (translated sorry) "This controlelement doesn't contain an
> object". The
> form shows an empty (white) control. I close the form, re-open it in
> design and
> voila, no problem at all. It even exposes my properties nicely.
>
> Martin.

solved. Please don't ask me why, but when I code the exact same thing
in C# it's working. In VB.NET it's not.