BLOB field problem.

kirkostaskirkostas Member Posts: 127
Hi,
I have created a new table with 9 BLOB fields having compression property set to NO and Sub Type property set to Memo.
I want to update the table with data using an external program written in Visual Basic 6 and having ADO2.5

I have worked before with Image field types in SQL Server and with BLOB field types in Oracle Server by accessing them with ADO2.5 without having any problem at all.

So, I ran my program and update the table successfully, but (there is always a but) when I try to get a backup of the database from Navision 4.0 I get this error message:

The following ODBC error occurred:
Error: [Microsoft][ODBC Driver Manager] Invalid string or buffer length
State ID: HY090

What the heck is this message !!! ](*,)
kirkostas

Comments

  • kinekine Member Posts: 12,562
    Try to switch the type from memo to something else. Maybe that the MEMO type needs some more things to save into the blob than only the data itself. See the discussion about the memo in NAV 2009 (viewtopic.php?f=32&t=30723)
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • kirkostaskirkostas Member Posts: 127
    I changed the Sub Type to User Defined which is the default option, but did't work.
    I received again the same error when I tried to backup my database.
    kirkostas
  • kinekine Member Posts: 12,562
    And image type?
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • kirkostaskirkostas Member Posts: 127
    Image type?
    What do you mean?
    kirkostas
  • kinekine Member Posts: 12,562
    Type of the BLOB field = Image.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • kirkostaskirkostas Member Posts: 127
    I disagree.
    BLOB field is a binary field and not a bmp or something.
    If you look in the SQL Server you will see that the BLOB field is actually the "Image" field which is a binary field and you can store inside it whatever you want but in binary.
    So it doesn't matter what I want to save in it. I know how to insert data in a binary field, inside and outside of navision, the problem is when I am filling data in this table I get this ODBC error message when I try to backup the database.

    Maybe I misunderstood you previous question about the Image type. :mrgreen:
    kirkostas
  • kinekine Member Posts: 12,562
    That type is for NAV. Because I assume, that when Image type is used, NAV is taking the data as binary data for some image and is not parsing them, you can store there what you want. If you set another type, e.g. Memo, NAV is assuming some format of data which are stored there (see the link from previous post) - e.g. length of the "string" saved in the blob. This can lead to the error you have got. It is why I am asking if you tried to use Image type, to set NAV in a way that it is not "parsing" the data withing the DB and is only taking them and backup them. It means to have complete picture of the situation around all the BLOB types in NAV.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • kirkostaskirkostas Member Posts: 127
    If you mean the Sub Type, which you can choose from "User Defined" types , Bitmap and Memo, it is only for additional information and it is used if you have many blob fields and you want to extract only the ones with the bitmap or the memo. It does not affect the field itself.

    Anyway I tried all of them without success.

    I still got the ODBC error message when backup the database.
    kirkostas
  • sspitkosspitko Member Posts: 1
    I am experiencing a similar problem. I have a table which has an uncompressed Blob field that has been populated externally in SQL. If the value staored in the field is fairly short such as "Yes" or "40%", I get the HY090 state error when I do a Calcfields on the field in Navision. Does anyone have any ideas?

    Thanks
  • kinekine Member Posts: 12,562
    Problems are when the data are <4bytes.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • Gollum83Gollum83 Member Posts: 19
    I have the same problem: i get the error with calcfields even if I import
    files over NAv Client.

    Has anyone has an idea why the odbc client cannot read files < 4 KB.
    Or can I config my MDAC components to do so?
Sign In or Register to comment.