473,406 Members | 2,293 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Using a .Net class lbrary in Access 2000

I have a class library (clsTestLib) that was created in VB.Net that I
would like to use in Access 2000. I created a typelib for the class
using regasm.exe. I am able to refernce (add a reference) the dll
using the generated typelib. In Access, when I run the Access
application and declare a new instance of the class as follows

Dim MyTest As clsTestLib.Class1
Set MyTest = New clsTestLib.Class1

I get an error Run-time message that says "File or assembly name
clsTestLib, or one of its dependencies, was not found".

If I do the same thing in a VB6 project I get the same error message
when I run the project in the IDE. However, if I compile the project
and run the executable file the program works fine, I do not get the
error message and I am able to access the class just fine.

What do I need to do to be able to acess my class library in Microsoft
Access 2000?
Jul 21 '05 #1
1 1521
Hi,

I had this problem myself and have just figured it out...

If your class isn't registered in the GAC your Microsoft Access 2000 program
directory should contain all output, ie .dlls etc generated from your .Net
project.

This directory is usually "C:\Program Files\Microsoft Office\Office10".

The reason for this, as I understand it anyhow, is that MSAccess.exe is the
host application, ie the applications domain and as with .Net if the
required assemblies aren't available in the GAC then the host application
directory must contain them, as private assemblies.

I've done this and my Access 2000 application successfully calls my .Net
assemblies exposed to Com.

Regards,

Simon Rear

"RichGolebiowski" <Ri****************@hotmail.com> wrote in message
news:7b**************************@posting.google.c om...
I have a class library (clsTestLib) that was created in VB.Net that I
would like to use in Access 2000. I created a typelib for the class
using regasm.exe. I am able to refernce (add a reference) the dll
using the generated typelib. In Access, when I run the Access
application and declare a new instance of the class as follows

Dim MyTest As clsTestLib.Class1
Set MyTest = New clsTestLib.Class1

I get an error Run-time message that says "File or assembly name
clsTestLib, or one of its dependencies, was not found".

If I do the same thing in a VB6 project I get the same error message
when I run the project in the IDE. However, if I compile the project
and run the executable file the program works fine, I do not get the
error message and I am able to access the class just fine.

What do I need to do to be able to acess my class library in Microsoft
Access 2000?

Jul 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Billy Jacobs | last post by:
I have a website which has both secure and non-secure pages. I want to uses forms authentication. How do I accomplish this? Originally I had my web.config file in the root with Forms...
1
by: J. P. Young | last post by:
I have been trying to get a previously built .NET component to run on a Windows 2000 Server box. It's previous home was on an XP box using ..NET framework version 1.0.3328. On that machine, it ran...
4
by: chris.dunigan | last post by:
I'm looking for an example of how to execute an existing DTS­ package from an ASP (VB)script and would appreciate any and all response. ­I don't even know if it's possible Thanks - Chuck...
11
by: Grasshopper | last post by:
Hi, I am automating Access reports to PDF using PDF Writer 6.0. I've created a DTS package to run the reports and schedule a job to run this DTS package. If I PC Anywhere into the server on...
15
by: Nathan | last post by:
I have an aspx page with a data grid, some textboxes, and an update button. This page also has one html input element with type=file (not inside the data grid and runat=server). The update...
4
by: Jim Hammond | last post by:
It would be udeful to be able to get the current on-screen values from a FormView that is databound to an ObjectDataSource by using a callback instead of a postback. For example: public void...
1
by: RichGolebiowski | last post by:
I have a class library (clsTestLib) that was created in VB.Net that I would like to use in Access 2000. I created a typelib for the class using regasm.exe. I am able to refernce (add a reference)...
0
by: Nilam2477 | last post by:
I have a C# class library (MyInterop.dll) with interface method for COM Interop. I have VC++ app which will load the C# library and invoke the methods at run time. I know that if i use #import...
7
by: =?Utf-8?B?QU9UWCBTYW4gQW50b25pbw==?= | last post by:
Hi, I have been using the code (some of it has been removed for simplicity) below to allow authenticated (using ASP.NET membership database) users to get a file from their archive area. It...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.