Open dental v21.2 DB conversion

This forum is for programmers who have questions about the source code.
Post Reply
mskoda
Posts: 11
Joined: Tue Jan 17, 2017 8:38 am

Open dental v21.2 DB conversion

Post by mskoda » Mon Nov 01, 2021 3:17 pm

Hi,
we are using OpenDental for so many years now. The last stable version that we compiled was 17.1, and this one is HEAD from your 21.2 svn repository.
First of all, when source code is compiled in debug mode, the application manages to start but throws exceptions when the patient is selected, and the accounting or chart button is pressed. If we compile in release mode, the app fails to start - DB version is greater than app version. A new version of the application on its first run made a conversion of DB from 17.1.26.0 to 21.2.47.0. App version is 21.2.46.0.

Account button error:

Error Encountered - 1.11.2021. 22:33:40
Unhandled exception : The type initializer for 'OpenDentBusiness.EmailMessages' threw an exception.
System.TypeInitializationException
at OpenDentBusiness.EmailMessages.GetUnsentTypes(EmailPlatform emailTypes)
at OpenDentBusiness.AccountModules.GetCommLog(Patient pat, Family fam)
at OpenDentBusiness.AccountModules.<>c__DisplayClass1_0.<GetAll>b__32()
at CodeBase.Logger.LogAction(String log, LogPath path, Action act, String optionalDesc) in C:\Projects\OpenDental\v21_2\CodeBase\Utilities\Logger.cs:line 86
at OpenDentBusiness.AccountModules.<>c__DisplayClass1_0.<GetAll>b__9()
at OpenDentBusiness.AccountModules.<>c__DisplayClass1_0.<GetAll>b__22()
at CodeBase.ODThread.<>c__DisplayClass63_0.<RunParallelImproved>b__1(ODThread o) in C:\Projects\OpenDental\v21_2\CodeBase\Utilities\ODThread.cs:line 570
at CodeBase.ODThread.SetupRunTeardown() in C:\Projects\OpenDental\v21_2\CodeBase\Utilities\ODThread.cs:line 194
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at CodeBase.MiscUtils.PreserveExceptionInfoAndThrow(Exception ex) in C:\Projects\OpenDental\v21_2\CodeBase\Utilities\MiscUtils.cs:line 251
at CodeBase.ODThread.<RunParallel>g__HandleException|61_0(Exception ex, <>c__DisplayClass61_0& ) in C:\Projects\OpenDental\v21_2\CodeBase\Utilities\ODThread.cs:line 485
at CodeBase.ODThread.RunParallel(List`1 listActions, Int32 timeoutMS, Int32 numThreads, ExceptionDelegate onException, Boolean doRunOnCurrentThreadIf1Processor, Boolean isLegacy) in C:\Projects\OpenDental\v21_2\CodeBase\Utilities\ODThread.cs:line 507
at OpenDentBusiness.AccountModules.GetAll(Int64 patNum, DateTime fromDate, DateTime toDate, Boolean intermingled, Boolean showProcBreakdown, Boolean showPayNotes, Boolean showAdjNotes, Boolean doMakeSecLog, Boolean doGetOrtho)
at OpenDental.ControlAccount.<>c__DisplayClass285_0.<RefreshModuleData>b__0() in C:\Projects\OpenDental\v21_2\OpenDental\Main Modules\ControlAccount.cs:line 2442
at CodeBase.Logger.LogAction(String log, LogPath path, Action act, String optionalDesc) in C:\Projects\OpenDental\v21_2\CodeBase\Utilities\Logger.cs:line 86
at OpenDental.ControlAccount.RefreshModuleData(Int64 patNum, Boolean isSelectingFamily) in C:\Projects\OpenDental\v21_2\OpenDental\Main Modules\ControlAccount.cs:line 2442
at OpenDental.ControlAccount.<>c__DisplayClass272_0.<ModuleSelected>b__0() in C:\Projects\OpenDental\v21_2\OpenDental\Main Modules\ControlAccount.cs:line 2126
at CodeBase.Logger.LogAction(String log, LogPath path, Action act, String optionalDesc) in C:\Projects\OpenDental\v21_2\CodeBase\Utilities\Logger.cs:line 86
at OpenDental.ControlAccount.ModuleSelected(Int64 patNum, Boolean isSelectingFamily) in C:\Projects\OpenDental\v21_2\OpenDental\Main Modules\ControlAccount.cs:line 2126
at OpenDental.ControlAccount.ModuleSelected(Int64 patNum) in C:\Projects\OpenDental\v21_2\OpenDental\Main Modules\ControlAccount.cs:line 2107
at OpenDental.FormOpenDental.SetModuleSelected(Boolean menuBarClicked) in C:\Projects\OpenDental\v21_2\OpenDental\Main Modules\FormOpenDental.cs:line 3867
at OpenDental.FormOpenDental.moduleBar_ButtonClicked(Object sender, ButtonClicked_EventArgs e) in C:\Projects\OpenDental\v21_2\OpenDental\Main Modules\FormOpenDental.cs:line 3806
at OpenDental.ModuleBar.OnButtonClicked(ModuleBarButton myButton, Boolean myCancel) in C:\Projects\OpenDental\v21_2\OpenDental\User Controls\ModuleBar.cs:line 105
at OpenDental.ModuleBar.OnMouseUp(MouseEventArgs e) in C:\Projects\OpenDental\v21_2\OpenDental\User Controls\ModuleBar.cs:line 383
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
-------------------------------------------
Inner exception: Could not load file or assembly 'Health.Direct.Agent, Version=1.2.0.8, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
System.IO.FileNotFoundException
at OpenDentBusiness.EmailMessages..cctor()


Chart button error:


Error Encountered - 1.11.2021. 22:37:25
Unhandled exception : The type initializer for 'OpenDentBusiness.EmailMessages' threw an exception.
System.TypeInitializationException
at OpenDentBusiness.EmailMessages.GetUnsentTypes(EmailPlatform emailTypes)
at OpenDentBusiness.ChartModules.GetProgNotes(Int64 patNum, Boolean isAuditMode, ChartModuleComponentsToLoad componentsToLoad)
at OpenDentBusiness.ChartModules.<>c__DisplayClass2_0.<GetAll>b__0()
at CodeBase.Logger.LogAction(String log, LogPath path, Action act, String optionalDesc) in C:\Projects\OpenDental\v21_2\CodeBase\Utilities\Logger.cs:line 86
at OpenDentBusiness.ChartModules.GetAll(Int64 patNum, Boolean isAuditMode, ChartModuleComponentsToLoad componentsToLoad, Boolean doMakeSecLog)
at OpenDental.ControlChart.<>c__DisplayClass574_0.<RefreshModuleData>b__0() in C:\Projects\OpenDental\v21_2\OpenDental\Main Modules\ControlChart.cs:line 7934
at CodeBase.Logger.LogAction(String log, LogPath path, Action act, String optionalDesc) in C:\Projects\OpenDental\v21_2\CodeBase\Utilities\Logger.cs:line 86
at OpenDental.ControlChart.RefreshModuleData(Int64 patNum, Boolean isFullRefresh) in C:\Projects\OpenDental\v21_2\OpenDental\Main Modules\ControlChart.cs:line 7934
at OpenDental.ControlChart.<>c__DisplayClass516_0.<ModuleSelected>b__0() in C:\Projects\OpenDental\v21_2\OpenDental\Main Modules\ControlChart.cs:line 4884
at CodeBase.Logger.LogAction(String log, LogPath path, Action act, String optionalDesc) in C:\Projects\OpenDental\v21_2\CodeBase\Utilities\Logger.cs:line 86
at OpenDental.ControlChart.ModuleSelected(Int64 patNum, Boolean isFullRefresh, Boolean isClinicRefresh) in C:\Projects\OpenDental\v21_2\OpenDental\Main Modules\ControlChart.cs:line 4884
at OpenDental.ControlChart.ModuleSelected(Int64 patNum, Boolean isClinicRefresh) in C:\Projects\OpenDental\v21_2\OpenDental\Main Modules\ControlChart.cs:line 4870
at OpenDental.ControlChart.ModuleSelectedErx(Int64 patNum) in C:\Projects\OpenDental\v21_2\OpenDental\Main Modules\ControlChart.cs:line 4906
at OpenDental.FormOpenDental.SetModuleSelected(Boolean menuBarClicked) in C:\Projects\OpenDental\v21_2\OpenDental\Main Modules\FormOpenDental.cs:line 3885
at OpenDental.FormOpenDental.moduleBar_ButtonClicked(Object sender, ButtonClicked_EventArgs e) in C:\Projects\OpenDental\v21_2\OpenDental\Main Modules\FormOpenDental.cs:line 3806
at OpenDental.ModuleBar.OnButtonClicked(ModuleBarButton myButton, Boolean myCancel) in C:\Projects\OpenDental\v21_2\OpenDental\User Controls\ModuleBar.cs:line 105
at OpenDental.ModuleBar.OnMouseUp(MouseEventArgs e) in C:\Projects\OpenDental\v21_2\OpenDental\User Controls\ModuleBar.cs:line 383
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
-------------------------------------------
Inner exception: Could not load file or assembly 'Health.Direct.Agent, Version=1.2.0.8, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
System.IO.FileNotFoundException
at OpenDentBusiness.EmailMessages..cctor()

Best regards

joes
Posts: 239
Joined: Tue Aug 13, 2019 12:41 pm

Re: Open dental v21.2 DB conversion

Post by joes » Tue Nov 02, 2021 8:19 am

Try updating to the revision for our last build. Currently it is revision 30195 for version 21.2.46. If that doesn't resolve the issue, please let me know.
Joe Sullivan
Open Dental Software
http://www.opendental.com

mskoda
Posts: 11
Joined: Tue Jan 17, 2017 8:38 am

Re: Open dental v21.2 DB conversion

Post by mskoda » Tue Nov 02, 2021 11:01 am

Thank you for your help. I'm already at revision 30242. When deleted binaries and rebuild both debug, and release version again, debug version started to work, without exceptions. The release version of the program doesn't work. It throws a pop-up with the message: The current version is lower than the database version. Current version 21.2.46.0. Database version 21.2.47.0. Database conversion has been made with this program, from v.17.1.
Should we use debug version or you can help us resolve the problem, so we can use the release version?

Best regards

joes
Posts: 239
Joined: Tue Aug 13, 2019 12:41 pm

Re: Open dental v21.2 DB conversion

Post by joes » Tue Nov 02, 2021 1:17 pm

Any revision beyond 30195 may have convert script methods that will make changes to the DB that we have not yet released. That is why it is showing that the DB is on version 21.2.47. If you have a backup of your 17.1.26 DB, make a copy of it, revert to revision 30195 for the release of version 21.2.46, and try running that against the copy of your backup. That should update the DB to the appropriate version, and allow you to use the program in release mode.
Joe Sullivan
Open Dental Software
http://www.opendental.com

mskoda
Posts: 11
Joined: Tue Jan 17, 2017 8:38 am

Re: Open dental v21.2 DB conversion

Post by mskoda » Tue Nov 02, 2021 2:39 pm

Thank you very much, after reverting to revision 30195, and converting DB from the backup database everything works fine. :D

Post Reply