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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T17:01:04+00:00 2026-05-11T17:01:04+00:00

I’m working on a legacy product and i have some SQL being executed through

  • 0

I’m working on a legacy product and i have some SQL being executed through ADO, to an Access database with linked tables to SQL Server. I’m getting the error ‘Undefined function ‘Round’ when i execute the SQL but if i take the query and run directly in Access it works fine. I know that EVERYTHING is correct and that this is a machine specific issue since this is production code, it works on other machines and has been deployed successfully for many clients.

I’m not even sure where to begin to be honest. I’m running the correct (latest) versions of Jet/ADO/MDAC.

ANY help would be appreciated.

Thanks in advance.

EDIT: Obviously, the SQL includes the aggregate function ‘Round’. I’m aware of the differences between Jet and SQL implementations. This problem is due to some problem with a component on my machine and NOT with the code. The SQL executes properly when done through MS Access 2007 but NOT through ADO.

  • 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-11T17:01:04+00:00Added an answer on May 11, 2026 at 5:01 pm

    EDIT2: Right solution from the comments:

    shahkalpesh: If it executes fine thru Access, it could be that Access has the DLL available to it, which has the Round function. What is the connection string, you are using?

    Stimul8d: I’m not sure how it can be anything so do with the connection string. This code works on EVERY other machine, with no changes; just not on mine.

    Andomar: Well, that’s your problem right there, your machine is farked up. You can still install vb6 sp6 maybe.

    Stimul8d: Well, SP6 fixed it. Cheers Anndomar, no idea why SP6 fixed it but it did!

    EDIT: Based on your comment this newsgroup post might be the answer:

    Unfortunately, when you are running
    queries from outside of Access (as you
    are from VB), your only connection to
    the database is through the Jet
    engine, which doesn’t know anything
    about most VBA functions. There’s no
    way around this, other than to return
    the data to your VB application and
    use the functions on the data there.

    And two posts later:

    I solved the problem. Updated my VB
    with the Service Pack 6… it took
    care of the problems.

    Old answer here:

    Try FLOOR() instead of ROUND().

    To round something to the nearest integer, you could:

    declare @floatmyboat float
    set @floatmyboat = 1.51
    select floor(@floatmyboat+0.5)
    

    P.S. Maybe post the exact error you get. If it’s “The round function requires 2 to 3 arguments.”, that means Sql Server is borking on the ROUND().

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

Sidebar

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.