[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

08/05/2009 at 12:16PM PDT, ID: 24629253
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

9.3

Arithmetic overflow error converting expression to data type datetime

Asked by Millkind in .NET, SQLBase, MS SQL Server

I have a piece that sends out bday cards to patrons based on the data in a sql database.  It has worked fine for several years.  On july 30 it started giving the following error message:
System.Data.SqlClient.SqlException: Arithmetic overflow error converting expression to data type datetime.
   at System.Data.SqlClient.SqlDataReader.Read()
   at System.Data.Common.DbDataAdapter.FillLoadDataRow(SchemaMapping mapping)
   at System.Data.Common.DbDataAdapter.FillFromReader(Object data, String srcTable, IDataReader dataReader, Int32 startRecord, Int32 maxRecords, DataColumn parentChapterColumn, Object parentChapterValue)
   at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable, IDataReader dataReader, Int32 startRecord, Int32 maxRecords)
   at System.Data.Common.DbDataAdapter.FillFromCommand(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
   at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
   at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)

I have not changed the software and the data has not changed.  The following is the sql select statement that is causing the error.

SELECT     achDateOfBirth, achEmail, achName, lMealPlan
FROM         tblStudent
WHERE     (DATEPART(MM, achDateOfBirth) = DATEPART(mm, @sdate)) AND (LEN(achEmail) > 1) AND (DATEPART(dd, achDateOfBirth) = DATEPART(dd, @sdate))
                      AND (NOT (achDateOfBirth = N'1/1/1900'))

It is SQL Server 2000/2003
The last udate for the server stuff was jly 15, 2009, but there was an update for IE explorer on 7/30/2009
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
Private Function studentbirthdays()
        Try
            bdaycomman.Parameters("@sdate").Value = alldater 'alldater is date.today
            Bdayds1.Clear()
            bday.Fill(Bdayds1) 'casues error
            For Each ds As DataRow In Bdayds1.Tables(1).Rows
                olApp = New Outlook.Application
                olMail = olApp.CreateItem(Outlook.OlItemType.olMailItem)
                If InStr(ds.Item(1), "gettysburg") Then
                    'olMail.To = ds.Item(1)
                    olMail.To = "mdmiller@gettysburg.edu"
                    olMail.Subject = "HAPPY BIRTHDAY!"
                    olMail.HTMLBody = "<html><body><p><IMG SRC='" & hbpicpath & "'></p></body></html>"
                    olMail.Send()
                Else
 
                End If
            Next
        Catch ex As Exception
            'MsgBox(ex.ToString)
            errorwrite(ex.ToString)
        End Try
    End Function
 
Keywords: Arithmetic overflow error converting e…
 
Loading Advertisement...
 
[+][-]08/05/09 12:23 PM, ID: 25027062

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 30-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]08/05/09 12:25 PM, ID: 25027079

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: .NET, SQLBase, MS SQL Server
Sign Up Now!
Solution Provided By: DanielWilson
Participating Experts: 3
Solution Grade: A
 
 
[+][-]08/05/09 12:27 PM, ID: 25027091

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08/05/09 09:47 PM, ID: 25030193

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 30-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]08/06/09 04:07 AM, ID: 25031937

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08/06/09 08:59 AM, ID: 25034925

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08/06/09 09:00 AM, ID: 25034948

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08/06/09 09:06 AM, ID: 25035040

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08/06/09 06:17 PM, ID: 25039345

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20090824-EE-VQP-74 - Hierarchy / EE_QW_3_20080625