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 1046495
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T16:09:17+00:00 2026-05-16T16:09:17+00:00

I wanted to find out if it is possible to call MS Access Stored

  • 0

I wanted to find out if it is possible to call MS Access Stored Queries with parameters using DAAB.

I am using the Northwind sample database to test this scenario I have created the following Stored Query with parameter in MS Access:

PARAMETERS FirstName Text ( 255 );
SELECT Employees.ID
FROM Employees
WHERE (((Employees.[First Name])=[@FirstName]));

This query is stored with name: GetEmployeeIDByName

I have created a wrapper over the DAAB to allow access to various databases like SQL, Oracle, any OLEDB and and ODBC database.

Below is the sample code for my test:

Database db = new GenericDatabase("Provider=Microsoft.ACE.OLEDB.12.0; Data Source=C:\Database\Access\Northwind 20071.accdb",OleDbFactory.Instance);

DbCommand cmd = db.GetStoredProcedure("GetEmployeeIDByName");

db.AddInParameter(cmd,"@FirstName",DbType.String,40);

object employeeID = db.ExecuteScalar();

I get an error Invalid Operation. I am not sure if I am calling the stored Queries correctly as I am able to call Stored Queries that do not have any parameter without any errors.

  • 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-16T16:09:17+00:00Added an answer on May 16, 2026 at 4:09 pm

    I was able to resolve the issue. The issue was with the Northwind sample database. I then imported Northwind database from SQL Server into MS Access and also created the stored queries in MS Access. Here is the detailed discussion that I had with the Enterprise Library DAAB’s team: entlib.codeplex.com/Thread/View.aspx?ThreadId=223653 Hope it helps. Access does not care about the @ character you can call the parameter with or without the @ character.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm not sure if this is possible at all, but wanted to find out
I just wanted to find out if it's possible to disable image resizing in
Hey I just wanted to find out the working of the following script as
I decided to learn concurrency and wanted to find out in how many ways
This is a common scenario, but i wanted to find out which way is
I know I could use PHP to do this, but wanted to find out
I wanted to know is it possible to find a which file from several
I wanted to know if we could find out what type of switch our
I wanted to find out how to specify fields to appear side-by-side in BIRT
I wanted to find a way to upload a single file*, in the background,

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.