Solved

ODBC Error  8114  [Microsoft][ODBC SQL Server Driver][SQL Server]Error converting data type varchar to datetime.

Posted on 2011-03-14
2
1,697 Views
Last Modified: 2012-05-11
Having trouble passing a string which is converted to a date from an Access form to a SQL stored procedure.
Below is the function:

Call ParamSPT2(CDate(Forms!frmEPM_PROD!Text16))
0
Comment
Question by:psueoc
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 3

Accepted Solution

by:
Chadinzski earned 250 total points
ID: 35132329
Since the error appears to be generated from a call from Access to SQL, you might be able to wrap an
ON ERROR GOTO MyErrRoutine

That way you can put a break when the error occurs and check to see what text was passed.  It'd be helpful to know the string that caused the problem.
0
 
LVL 57

Assisted Solution

by:Raja Jegan R
Raja Jegan R earned 250 total points
ID: 35135344
>> Error converting data type varchar to datetime.

Kindly check the format of datetime you are getting as output from Access.
If it is some other format other than the default format / timezone set in SQL Server, then use appropriate CONVERT with appropriate styles so that string can be converted into datetime without any issues.
More on CONVERT and styles here:
http://msdn.microsoft.com/en-us/library/ms187928.aspx
0

Featured Post

Is Your DevOps Pipeline Leaking?

Is your CI/CD pipeline a hodge-podge of randomly connected tools? You’ve likely got a tool to fix one problem & then a different tool to fix another, resulting in a cluster of tools with overlapping functionality. Learn how to optimize your pipeline with Gartner's recommendations

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Trying to understand why my Index is so large 12 53
Need more granular date groupings 4 46
Using a SUBQUERY for the set variable 10 31
learning MS SSIS 13 27
If you find yourself in this situation “I have used SELECT DISTINCT but I’m getting duplicates” then I'm sorry to say you are using the wrong SQL technique as it only does one thing which is: produces whole rows that are unique. If the results you a…
This article describes how to use the timestamp of existing data in a database to allow Tableau to calculate the prior work day instead of relying on case statements or if statements to calculate the days of the week.
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…
Suggested Courses

710 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question