The specified path, file name, or both are too long. error when trying to open appointment chart

This forum is for programmers who have questions about the source code.
Post Reply
victoracho
Posts: 12
Joined: Sun May 12, 2024 4:49 pm

The specified path, file name, or both are too long. error when trying to open appointment chart

Post by victoracho » Wed Jun 19, 2024 9:58 am

The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters appear on my open dental patch, The change I did was hiding phone numbers and this happens when I open an appointment chart. I compiled it on debug mode. this only happens on certain Patients, anyone has any ideas ?

User avatar
jsalmon
Posts: 1591
Joined: Tue Nov 30, 2010 12:33 pm
Contact:

Re: The specified path, file name, or both are too long. error when trying to open appointment chart

Post by jsalmon » Wed Jun 19, 2024 3:49 pm

This sounds like a limitation of Windows (they only allow paths up to 256 characters if memory serves). What is the actual path that is causing the error?
Odds are you have an impressively long A to Z data path or debugging environment (aka the path to your bin folder).
The best thing about a boolean is even if you are wrong, you are only off by a bit.

Jason Salmon
Open Dental Software
http://www.opendental.com

victoracho
Posts: 12
Joined: Sun May 12, 2024 4:49 pm

Re: The specified path, file name, or both are too long. error when trying to open appointment chart

Post by victoracho » Thu Jun 20, 2024 5:06 am

Hi there friend, the error is appointing to the OpenDentBusiness/ODDataSet/ODDataTable.cs line 21. I must say that I had a previous error at the same location saying "Unhandled exception: data at the root level is invalid" then I just checked on the internet that changing the way xml is loaded on the ODDataTable.cs file would fix it, but now I get this error of path being too long.

Ive changed this method as stated on the internet like this:
xmlDocument.Load(xmlData);

and before was like this:
xmlDocument.LoadXml(xmlData);

User avatar
jsalmon
Posts: 1591
Joined: Tue Nov 30, 2010 12:33 pm
Contact:

Re: The specified path, file name, or both are too long. error when trying to open appointment chart

Post by jsalmon » Thu Jun 20, 2024 8:11 am

Sounds like the internet trolled you. Those methods do very different things.
The best thing about a boolean is even if you are wrong, you are only off by a bit.

Jason Salmon
Open Dental Software
http://www.opendental.com

victoracho
Posts: 12
Joined: Sun May 12, 2024 4:49 pm

Re: The specified path, file name, or both are too long. error when trying to open appointment chart

Post by victoracho » Thu Jun 20, 2024 8:18 am

I also thought the same, but using the method LoadXml returns the previous error I mentioned: "Unhandled exception: data at the root level is invalid"

Post Reply