Advertisement

07.01.2008 at 02:02PM PDT, ID: 23531662
[x]
Attachment Details

Error on import row - 'The added or subtracted value results in an un-representable DateTime.'

Asked by djoyceRRD in .NET, DB2 Database, .Net Editors & IDEs

Tags: ,

I'm loading a dataset through a stored procedure, and my dataset has 2 dateTime fields.  My stored procedure runs in a different class, then I copy that dataset into my form's dataset.  The first time it loads, everything is fine.  However, I need to be able to reload the data at the user's request.  For the reload, I clear the dataset table using DataSet1.Tables("Task").Clear(), then run loadTasks() (see below).  When it runs loadTasks the 2nd time, I am getting an error 'The added or subtracted value results in an un-representable DateTime.  Parameter name: t'.

Why does it work the first time and not the 2nd?  I haven't modified the data at this point, it's exactly the same.  Do I need to reinitialize the dataTable somehow?Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
Private Sub loadTasks()
        Dim dsTempSchedule As New DataSet()
 
        objMachine.getSchedule()
        dsTempSchedule = objMachine.ScheduleList
 
        For Each schedule In dsTempSchedule.Tables(0).Rows
            DataSet1.Tables(1).ImportRow(schedule)
        Next
    End Sub
 
Loading Advertisement...
 
[+][-]07.01.2008 at 02:40PM PDT, ID: 21911863

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 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.02.2008 at 05:28AM PDT, ID: 21915575

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 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.02.2008 at 07:30AM PDT, ID: 21916764

View this solution now by starting your 7-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, DB2 Database, .Net Editors & IDEs
Tags: vb .net, Visual studio 2008
Sign Up Now!
Solution Provided By: djoyceRRD
Participating Experts: 1
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628