Skip to content

System.InvalidCastException error #99

Description

@Virtute90

I encounter this error when I try to export documents

image

How can I solve it?

Activity

  1. UziTech commented on Apr 19, 2024

    @UziTech
    Owner

    Looks like you have a doc that has an item named "Form" and the value is not a string.

  2. KridGiant commented on Jun 21, 2024

    @KridGiant

    Hi UziTech
    I have the same error message. I tried to export a Notes standard nsf: log.nsf
    Unfortunately, I don't understand what exactly you mean by your reference to the error.
    All documents have a text entered in the field/item form in the log.nsf.

  3. UziTech commented on Jun 21, 2024

    @UziTech
    Owner

    All I did was read the error. Unless you can send me the nsf file I can't help debug more than that.

  4. KridGiant commented on Jun 21, 2024

    @KridGiant

    Thank you for your quick response.
    I have just found out the following.
    If I use an empty NSF file, no error is displayed.
    But as soon as I use an NSF with documents, this error is displayed.
    In every Notes document there is the field "Form". If I delete this field in the document, the error is not displayed.
    An export.sql file is generated. As far as I can tell, it only contains the instructions for creating the table, not any data records.
    Maybe that will help you. Otherwise have a nice weekend and see you on Monday.

  5. KridGiant commented on Jun 24, 2024

    @KridGiant

    Hi Tony

    Here is some detailed information with files.
    It may help you with troubleshooting.

    I created a new nsf file and created a document there.
    I then tried to export this to a file.

    ==> Screenshot error-notebook.jpg

    Then I deleted the "Form" field in the document and tried again

    1. content of the field Form ==> error_notebook-Form.jpg
    2. delete the Form field and export it again ==> error_notebook-afterdeleteForm.jpg
      Now you will be asked whether Server or File ==> File is selected
    3. the following file was created ==> exportnotebook.sql

    Enclosed is also the NSF file that I used for this. The Form field is deleted in the document.
    I hope it helps you.

  6. KridGiant commented on Jun 24, 2024

    @KridGiant
  7. UziTech commented on Jun 25, 2024

    @UziTech
    Owner

    Unfortunately I no longer have a computer with lotus notes installed so it seems I can't even open .nsf files.

    The "Form" is used as the table name and it is assumed to be a string[]. In #101 I changed it to check the type or just use the table name "table" as a default.

    See if this fixes the issue for you: NSF2SQL.next.zip

  8. KridGiant commented on Jun 25, 2024

    @KridGiant
  9. UziTech commented on Jun 26, 2024

    @UziTech
    Owner

    You can see my changes in #101 line 411

    I don't know what a System.ObjectD type is or why a doc item can't be converted to NotesItem. The only thing I can think is that this nsf file is not formatted correctly.

  10. UziTech commented on Jun 21, 2025

    @UziTech
    Owner

    see if v0.4.1 fixes it. It seems like the nsf file is corrupt but at least the fix should give a different error. A common theme in this type of error is that English is not the language used. It may be that "Form" field is a different word in other languages?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions