Import from ADO via Variant

Iwan_JauchIwan_Jauch Member Posts: 35
Hi everybody

Does anybody know how I can solve this problem? I receive this message, when I start my program. I try to import data via ADO from Access to Navision but It doesn't work really!

This data type is not supported by C/Side. You can access data from any of the following data types:

VT_VOID, VT_I2 ...

I hope someone can help me. Thanks

Best Regards
Iwan

Comments

  • nelsonnelson Member Posts: 107
  • nelsonnelson Member Posts: 107
    I got your private message.
    Can you post the code you are now using?
    Nelson Alberto
  • lubostlubost Member Posts: 632
    My experience tells me that NULL value isn't supported by Navision. Check your data.
  • girish.joshigirish.joshi Member Posts: 407
    Nelson,

    The tip you provided in your link was very helpful. I haven't tried the suggestion there, but I will and I will post how it works. I'm going to paraphrase what's in the link to make it easier for other mibuso users:

    Basically when you call Adofield.Value you get a binary representation of the field and some type information. If you try and use it Navision (assigning it, etc) you get an error because Navision only supports a small subset of types.

    The solution they provide is declare an ado stream variable. This lets you take binary data, and write it as text. So you declare a stream, write the data out as text, and then read it back in as text. Now since the data is in text format, you can evaluate that in Navision. Basically, you launder the data type.

    If you'd like some code samples, follow the link.
Sign In or Register to comment.