Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6994999
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T19:57:54+00:00 2026-05-27T19:57:54+00:00

I have an Access VBA project from where I refer to a COM Interop

  • 0

I have an Access VBA project from where I refer to a COM Interop .TLB written in C#. This C# code simply queries the SQL Server database and returns values via a simple LINQ-to-Entity query.

I’m getting the same error mentioned in this question:

The specified named connection is either not found in the configuration, not intended to be used with the EntityClient provider, or not valid

However, in my case, it is a Access VBA in a .ADP application that refers to my .Net 4.0 TLB, instead of another .Net project.

I’m aware that if it were another .Net project, I could add the EF connection string XML in its app.config or web.config. But what is the fix if my ‘calling’ application is Access 2003 VBA?

Here’s the VBA code that calls the .Net code

Dim CandidatePassword As String
Dim abc As New MISHash.Password

Dim PasswordStatus As Boolean
CandidatePassword = InputBox("Enter your password")
PasswordStatus = abc.IsValidPassword("myusername", CandidatePassword) ' FAILS HERE
If PasswordStatus Then
    MsgBox "Password valid."
Else
    MsgBox "Password failed."
End If

Please help. Thank you.

Update: Here is my C# code

using System.Linq;
using System.Runtime.InteropServices;
namespace MISHash
{

public class Password
{

   public Password()
   {

   }

   [ComVisible(true)] 
   public  void HashAndSave(string SomePassword)
    {
        string hashed = BCrypt.HashPassword(SomePassword, BCrypt.GenerateSalt(12));
        //save the hashed password in the database
    }

   [ComVisible(true)]
   public bool IsValidPassword(string CandidateUserName, string CandidatePassword)
    {

        string OriginalHashedPassword;
        using (MyDBEntities mycontext = new MyDBEntities())
        {
            OriginalHashedPassword = (from usr in mycontext.Users
                                       where usr.UserName.Equals(CandidateUserName)
                                       select usr.Password).FirstOrDefault();
        }
        bool matches = BCrypt.CheckPassword(CandidatePassword, OriginalHashedPassword);
        return matches;
    }
}
 }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T19:57:54+00:00Added an answer on May 27, 2026 at 7:57 pm

    See this similar question:
    Can I use / access the app.config from .net code, when called via COM

    These two seem like your best options:

    1. Manually create a secondary AppDomain
    2. Convert to a VSTO project

    Edit

    You can also try passing a hard-coded connection string in the constructor:

    MyDBEntities mycontext = new MyDBEntities("Server=.\SQLEXPRESS;Database=School;Trusted_Connection=true;Integrated Security=True;MultipleActiveResultSets=True"))
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have written a few modules of code in Access vba. Each code runs
So I have this Access Database Project file that I have been tasked to
I have an Access 2003 project in which all data is stored in SQL
I have developed a little software in ACCESS/VBA. It dealt with Lotus Notes so
I need to access the VBA code of Office documents (Excel workbooks, but it's
I have multiple sets of code I need to run in Access 2007 and
Occasionally, I have had to build a SQL string in VBA and execute it
We have a large MS Access project that requires GUI functionality that is difficult
We are moveing our old Access VBA / SQL 2005 application to new technologys
Well, I stepped in it now. I'm converting a program from Access vba to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.