DotNetSQLDataReader.Read error

krishnamkkrishnamk Member Posts: 27
I have written code to copy the data from SQL to Nav 2017.

I am getting the error. Will you please help me
========================
WHILE DotNetSQLDataReader.Read DO BEGIN
DotNetSQLDataReader.GetSchemaTable;

TmpBufferTimeSheet."Staff Id":=DotNetSQLDataReader.GetString(0);
TmpBufferTimeSheet."Entry Date" :=DT2DATE(DotNetSQLDataReader.GetDateTime(2));
TmpBufferTimeSheet."Starting Time" :=DotNetSQLDataReader.GetDateTime(2);
TmpBufferTimeSheet."Ending Time" :=DotNetSQLDataReader.GetDateTime(3);
TmpBufferTimeSheet."Actual Work Hours" :=DotNetSQLDataReader.GetDecimal(4);

//TmpBufferTimeSheet.INSERT;
END;
=====================187egg22vuu2.jpg
==

Answers

  • SuDSuD Member Posts: 102
    Error Does not Showing Properly..
  • SuDSuD Member Posts: 102
    I think,One of your Field Data type is Integer..
    I guess (TmpBufferTimeSheet."Entry Date") this one..
    Change it to Date,Datatype..
Sign In or Register to comment.