Problem when Reading directly from MS Access

ta5ta5 Member Posts: 1,164
Hi

I want to read directly from MS Access, but there is a problem with integer fields:
if Recordset.fields.item('ct').value = 0 then
This code does not compile because the ffw. error:
Type conversion is not possible because 1 of the operators contains an invalid type...

I've also tried with Format-Method, also with no success?

Any ideas for that?

Thanks in advance

Thomas

Comments

  • danlindstromdanlindstrom Member Posts: 130
    one suggestion is to treat all responses as text

    if Recordset.fields.item('ct').value = '0' then
    Regards
    Dan Lindström
    NCSD Navision 2.00 since 1999 (Navision Certified Solution Developer)
    MBSP Developer for Microsoft Dynamics NAV 2009
  • ta5ta5 Member Posts: 1,164
    one suggestion is to treat all responses as text

    if Recordset.fields.item('ct').value = '0' then


    This works, but it is quite tedious:
    IF FORMAT(Recordset.Fields.Item('ct').Value) = FORMAT(0) THEN BEGIN
    
Sign In or Register to comment.