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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

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…
Composite queries are used to retrieve the results from joining multiple queries after applying any filters. UNION, INTERSECT, MINUS, and UNION ALL are some of the operators used to get certain desired results.​
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

635 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