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

  • SEARCH
  • Home
  • 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 6589249
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T17:08:56+00:00 2026-05-25T17:08:56+00:00

I have written a program to save attendance of employees.The database engine is MS

  • 0

I have written a program to save attendance of employees.The database engine is MS Access. when I execute a query form the C# program using Data-Adapter it does not return values, but when I’m executing the same query in Access it gives results. I have used one table join in the query


OdbcConnection conn = new OdbcConnection(Variables.ConnectionString);
                conn.ConnectionTimeout = 50;
                if (conn.State != ConnectionState.Open) conn.Open();
                string query = "SELECT l.matchine_number, e.actual_emp_number, e.user_name, e.location_name, l.date_time FROM tbl_log l " +
                               "RIGHT OUTER JOIN tbl_enroled_users AS e ON e.enroled_emp_number = l.enroled_number " +
                               "WHERE " +
                               "l.matchine_number LIKE '*" + txtMatchineNumber.Text + "*' AND " +
                               "e.actual_emp_number LIKE '*" + txtEmpNumber.Text + "*' AND " +
                               "e.user_name LIKE '*" + txtName.Text + "*' AND " +
                               "e.location_name LIKE '*" + txtLocation.Text + "*' AND " +
                               "l.date_time >= #" + dtFrom.Value.ToString("M/d/yyyy") + " 12:00:00 AM# AND " +
                               "l.date_time <= #" + dtTo.Value.ToString("M/d/yyyy") + " 11:59:59 PM# " +
                               "ORDER BY l.matchine_number, e.actual_emp_number, e.user_name, e.location_name, l.date_time";
                OdbcDataAdapter adptr = new OdbcDataAdapter(query, conn);
                DataTable dt = new DataTable();
                adptr.Fill(dt);               

                if (conn.State != ConnectionState.Closed) conn.Close();

Please Help

  • 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-25T17:08:57+00:00Added an answer on May 25, 2026 at 5:08 pm

    without any error-messages or the generated query-string it’s just guessing. but my idea is that the wildcards you’re using are not correctly interpreted. Try to change * into % and see if it works.

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

Sidebar

Related Questions

I have written this program, which sorts some ints using a functor: #include<iostream> #include<list>
I have a program which reads data from 2 text files and then save
I have written a program to process some data written to disk in big-endian
I have written a program to insert a row in the contact database which
I have written a program in C# using Visual Studio 2010. At current it
I have a program which executes constantly and I need to save data every
I have written a program using Microsoft Visual C# 2010 Express. I need to
I have written a program in C to parse large XML files and then
I have written a program that will etablish a network connection with a remote
I have written a program with both a Advanced Mode and a Beginner Mode

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.