Options

automation datatype in navision

jksjks Member Posts: 277
hi all,

I am using automation data type of navision to transfer data from Access to navision table.

In my Access sheet some fields are blank. For this field i get an error.

How to solve it.

Thanks for any help.

Comments

  • Options
    PrebenRasmussenPrebenRasmussen Member Posts: 137
    Maybe the field is not blank, it might contain a NULL. Try getting the value using a variable of type Variant.
  • Options
    rvduurenrvduuren Member Posts: 92
    Hello Jsk,

    I asume you use 'Microsoft DAO x.x Object Library'.DBEngine for accessing M$ Access, I had the same problem (Attain 3.60) and fixed it by replacing in the NULL in the Query and it worked for me. This is how I did it:
    Query := 'SELECT IIF( Table.StringField is null,"0",Table.StringField) as NewStringName, IIF( Table.DateField is null,0,Table.DateField) as NewDateName, FROM Table ORDER BY Table.StringField,Table.DateField';
    
    Met vriendelijke groet, best regards,

    Rvduuren
  • Options
    kinekine Member Posts: 12,562
    I assume that you are inserting data into MS SQL server. See http://www.mibuso.com/forum/viewtopic.php?t=6530 for examples of settings... mainly "Maintain Defaults"...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • Options
    jksjks Member Posts: 277
    Hi all,

    I checked 'Maintain Defaults' option. But still getting an error.

    I also tried IIF. But it gives me an following error.
    'No value given for one or more required parameter'

    I am using
    'Microsoft ActiveX Data Objects Recordset 2.5 Library'.Recordset

    Please help
  • Options
    MagnusMagnus Member Posts: 1
    You can use the Actualsize property of an ADO-field to check on Null-values. If the actual size = 0 then the value will probably be null.

    Hope this helps. Greetz
  • Options
    jksjks Member Posts: 277
    Hi all,

    It was my mistake. IIF works. But I get some problem with it.
    I have one field of type memo in my table. I handeled it like
    iif(table1.memofield is null, "0", table1.memofield)

    Problem is that I am getting only some portion of the memofield(when it is not null)

    Please help.
Sign In or Register to comment.