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,682 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SubQuery link 4 43
2 IIF's in Access query 25 47
Syntax Issue with SSIS module 26 139
compare date to getdate() 8 16
In database programming, custom sort order seems to be necessary quite often, at least in my experience and time here at EE. Within the realm of custom sorting is the sorting of numbers and text independently (i.e., treating the numbers as number…
'Between' is such a common word we rarely think about it but in SQL it has a very specific definition we should be aware of. While most database vendors will have their own unique phrases to describe it (see references at end) the concept in common …
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

756 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