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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T14:06:23+00:00 2026-05-10T14:06:23+00:00

When supplying dates to a stored procedure via a parameter I’m a little confused

  • 0

When supplying dates to a stored procedure via a parameter I’m a little confused over which format to use for the dates. My original VBA syntax used the ADO Connection object to execute the stored procedure:

Set SentDetailRS = Me.ADOConnectionToIntegrity.Execute('dbo.s_SelectAggregatedSentDetailList '' & fCSQLDate(EffectiveDate) & ''', , adCmdText) 

This works fine for me using the date syntax yyyy-mm-dd but when another user executes the code they recieve the error: 13 ‘Type Mismatch’.

After some experimentation I found that supplying the date in the format dd/mm/yyyy fixes this error for the user but now gives me the error!

Executing the stored procedure using a command object with parameters works regardless of the format of the date (I assume ADO is taking care of the formatting behind the scenes). I thought that using the format yyyy-mm-dd would work universally with SQL Server?

I’m also perplexed as to why this problem appears to be user specific? I noticed that my default language on SQL Server is ‘English’ whereas the other user’s default language is ‘British English’, could that cause the problem?

I’m using ADO 2.8 with Access 2003 and SQL Server 2000, SQL Server login is via Windows integrated security.

  • 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. 2026-05-10T14:06:23+00:00Added an answer on May 10, 2026 at 2:06 pm

    Be careful, and do not believe that ADO is taking care of the problem. Universal SQL date format is ‘YYYYMMDD’, while both SQL and ACCESS are influenced by the regional settings of the machine in the way they display dates and convert them in character strings.

    Do not forget that Date separator is # in Access, while it is ‘ in SQL

    My best advice will be to systematically convert your Access #MM-DD-YYYY# (or similar) into ‘YYYYMMDD’ before sending the instruction to your server. You could build a small function such as:

    Public function SQLdateFormat(x_date) as string  SQLDateFormat = _    trim(str(datePart('yyyy',x_date))) & _    right(str(datePart('m',date)),2) & _    right(str(datePart('d',date)),2)     ''be carefull, you might get something like '2008 9 3' SQLDateFormat = replace(functionSQLDateFormat,' ','0')    '' you will have the expected '20080903'  End function 

    If you do not programmatically build your INSERT/UPDATE string before sending it to the server, I will then advise you to turn the regional settings of all the machines to the regional settings of the machine hosting SQL. You might also have to check if there is a specific date format on your SQL server (I am not sure). Personnaly, I solved this kind of localisation problems (it also happens when coma is used as a decimal separator in French) or SQL specific characters problems (when quotes or double quotes are in a string) by retreating the SQL instructions before sending them to the server.

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

Sidebar

Related Questions

I'm trying to use NeoLoad to generate and execute SOAP requests and upon supplying
In my app, I am supplying the most current version of my database via
I have created a dialog which can be called from anywhere by supplying a
I have a sql stored procedure similar to below : create procedure procedurename declare
We are supplying a blob of HTML content to be imported and displayed on
I'm asking this with the intention of also supplying the answer, since I had
I have a Python list that I'm supplying to the template: {'error_name':'Please enter a
When the users attempt login to my application after supplying credentials & pressing the
I'm binding events to a container div with jQuery's on() function and supplying a
I'm trying to allow users to post videos on my site by supplying only

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.