none
class name is invalid

    Question

  • I tried to add a memo filed to a table, the "modify structure" worked okay, but when I attempted to add the field to a form I get the message "Class name is invalid".  If I try to add a memo field from a different table it works okay, so I think the problem is probably with the table... but what?

    John D. Vandervort

    Saturday, March 30, 2019 2:31 PM

Answers

  • Well, there's nothing hidden and when you have tables in the dataenvironment that's just info about them.

    USE yourform.scx and browse to the dataenvironment related records. There will be a reason, once more: There is a default mapping and there is one about the table itself. So are you really sure these specific tables are not overriding the default mapping?

    you may also PACK the scx and see if that fixes its behaviour.

    Bye, Olaf.

    • Marked as answer by JohnCompass Monday, April 1, 2019 7:18 PM
    Monday, April 1, 2019 3:13 PM

All replies

  • What do you mean with "add the fields to the form"?

    Dragging fields from the dataenvironment?

    Well, take a look at what cointrol class is defined for that field in the section '"map field type to classes" in the table designer. A display library and display class have to be valid and existing names.

    If there is nothing defined the default for memo is used, which should be EditBox, but that may be overridden in options in the tab Field Mapping. 

    Bye, Olaf.

    Saturday, March 30, 2019 7:25 PM
  • The "map field type to classes" is set to default EditBox.

    Very interesting: I was not able to drag the field from the main table, but if I drag from the same table opened again - "again alias 'different' " - the field dropped on the form just fine.  The "main" table is quite "old", has been in the app for several years. Is there some setting that was improper when it was initially created, that somehow works on a different alias?
    I was able to work around this by placing the memo field on the form by using the form designer and selecting "Edit Box", then set the "Control Source" from the table.  So, it works okay, but I am still pondering the 'why', and what if anything I can do to make it work normally. There is another totally different table in the app that acts the same way - it is also one of the old tables.


    John D. Vandervort

    Monday, April 1, 2019 2:56 PM
  • Well, there's nothing hidden and when you have tables in the dataenvironment that's just info about them.

    USE yourform.scx and browse to the dataenvironment related records. There will be a reason, once more: There is a default mapping and there is one about the table itself. So are you really sure these specific tables are not overriding the default mapping?

    you may also PACK the scx and see if that fixes its behaviour.

    Bye, Olaf.

    • Marked as answer by JohnCompass Monday, April 1, 2019 7:18 PM
    Monday, April 1, 2019 3:13 PM
  • Thanks Olaf,

     Packing the scx solved the problem.

    John


    John D. Vandervort

    Monday, April 1, 2019 7:18 PM