Topic: Invalid character error

The project was saved properly in the hard disk without any error message. However, on re-opening the project it shows an error message: "A name contained an invalid character...". The forms won't load. How to solve this issue?

Post's attachments

Attachment icon invalid.zip 277.42 kb, 273 downloads since 2019-12-24 

Re: Invalid character error

Hi,
Can you upload the whole project (without the .exe) and I'll try and have a look.
I seem to recall having a similar problem a couple of years ago - not sure I can remember if / how I fixed it though.
Derek.

Re: Invalid character error

I have attached the project. Please have a look. Yes, earlier I had lost forms while working from pen-drive.

Post's attachments

Attachment icon project.zip 724.7 kb, 274 downloads since 2019-12-24 

Re: Invalid character error

Hi,
I've not been able to see anything obvious and the error message isn't all that helpful. 
I think this is a question for Dmitry.
The only other course of action might be to use an earlier version of forms.xml, but depending on the number of changes you've made recently, I don't know how realistic this is.
Derek.

Re: Invalid character error

There were a lot of crazy chars in your forms.xml file ;-)

I corrected it but some components are gone.

You can download XML Notepad and Notepad++

https://www.microsoft.com/en-us/downloa … px?id=7973
https://notepad-plus-plus.org/

You can try to open forms.xml with XML Notepad. If you get an error you get the column of the error.

Then open forms.xml with notepad++ and hit ctrl+g. Select offset and fill in the error position from XML Notepad.

Hope it helps...

Post's attachments

Attachment icon forms.zip 124.33 kb, 269 downloads since 2019-12-27 

Re: Invalid character error

Thanks, @cbnbg. Making correction in XML file using Notepad++ was a daunting task, that I was unable to perform. I recreated the new forms from an earlier version of the project as suggested by Derek and the error disappeared. However, the joy is short-lived as another error has appeared. On clicking a button, whose action is to show a form, error pops up: "" is a not valid integer value  . How to resolve this issue? Redoing the project means more hours lost.

Post's attachments

Attachment icon valid_integer.JPG 84.3 kb, 127 downloads since 2020-01-05 

Re: Invalid character error

Hello Eyeman,
Can you attach your project?
Derek

Re: Invalid character error

Happy new year Derek.
I have attached the project. Initially, the application again ran ok when saved to a new folder, but soon the same error appeared. Please have a look.

Post's attachments

Attachment icon My_Eyes_49.zip 553.23 kb, 269 downloads since 2020-01-05 

Re: Invalid character error

@eyeman303: I added a forms.xml to my last post, so I didn't want to do it yourself ;-)

I took a look at your project and the problem is your grid. I removed it from DB_Form_010_LIST_BILL_REGISTER and it opens.

What I would do is:

  • remove the grid

  • save

  • add a new grid (NOT cut and paste).

  • save

  • run

If all is fine then step by step add new fields to the grid. After each field run your application.
When you get the error again you can say which field/setting triggered the error.

Re: Invalid character error

Hello Eyeman
Happy New Year to you too.
I think your problem lies with your data,  There are records in AA_001_REC_PATIENT_REG and AA_005_REC_BILLING with missing foreign keys and missing data (please see the screen shots in the attachment).  Or use something like SQLITESTUDIO to have a look at the raw data and you will see the problem.  If you delete these records, you no longer get the error.
Why the data had missing key information is, of course, the more important issue (although perhaps it was just test data you were using and that's why it's incomplete - let's hope so).
Regards,
Derek.

Post's attachments

Attachment icon myeyes49.zip 873.52 kb, 288 downloads since 2020-01-05 

Re: Invalid character error

Thank you cbnbg and Derek.
As you have identified, the problem was in the table grid and particularly the data which was referred to. I deleted many NULL entries in the SqlLiteStudio and the error is gone. I need to look deeply into the related table structure and forms to understand why NULL entries are happening. Also, there are some duplicate records!
Regards,
eyeman303

Post's attachments

Attachment icon null_entries.zip 285.24 kb, 276 downloads since 2020-01-05