Hi,
Can anybody tell me how to get value from Recordset into my Nav table. I am unable handle if the value is NULL in recordset.
FieldValue:=ADORecSet.Fields.Item('kdate').Value;
where kdate is date and time and sometimes, it is NULL.
Warm Regards
KMK
0
Comments
?
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
I have changed query with isnull and query is working fine, still I am getting error at the point of code
REPEAT
// Intailize
Myvar := Myvar +1;
AttendanceData.INIT;
AttendanceData.EntryNum:= vlastno;
AttendanceData.PName:= ADORecSet.Fields.Item('pName').Value;
AttendanceData.Date:= ADORecSet.Fields.Item('date1').Value; AttendanceData.total:= ADORecSet.Fields.Item('Total').Value;
{
IF AttendanceData.total >0 THEN
BEGIN
AttendanceData.Intime:=ADORecSet.Fields.Item('Intime').Value;
AttendanceData.Outtime:=ADORecSet.Fields.Item('Outtime').Value;
END;
MESSAGE(FORMAT(ADORecSet.Fields.Item('Total').Value));
AttendanceData.total:= ktotal ;
}
AttendanceData.INSERT;
vlastno:=vlastno+1;
ADORecSet.MoveNext();
UNTIL ADORecSet.EOF();
ADORecSet.Close();
and error
is
'The length of the text string exceed the size of string buffer'
can advice pleae
kmk
Can you run the query in SQL SMS and see what the values are?
Also the value returned is a text and you are assigned it to a date type?
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
I have done it after long support from you. The values are stored VARIANT from SQL query, the type like V-date..................form like VARDATE etc.
we have get the value from Var*** to Text and Text to date again.
This it is working.
I will send code please check
Warm regards
KMK