Opening Practice Management, Central Console results in the following error:
System.InvalidCastException: Object cannot be cast from DBNull to other types.
at System.DBNull.System.IConvertible.ToInt32(IFormatProvider provider)
at System.Convert.ToInt32(Object value)
at APS.Console.ConsoleForm.GetObjectId(Int32 joeId)
at APS.Console.ConsoleForm.Start(Int32 userId, String userName, Object parameters)
at APS.Console.ConsoleForm.Initialize(Int32 applicationId, Int32 userId, String userName, Object context)
at APS.Console.ConsoleController.<>c__DisplayClass1.<StartOnNewThread>b__0()
This is caused by using mixed authentication methods between the ODBC and the Advance connection string.
If the c:/Adv2000/aadbconf file is using SQL authentication and the ODBC connection is using Windows, then this issue will occur.
To resolve this issue please ensure that the authentication methods on the ODBC connection and the Adv2000/aadbconf.exe file match.
Check the ODBC connection
Go to C:\windows\Syswow64\odbcad32.exe double click to open.
Go to System tab and select the ODBC connection aps_dsql.
Select Configure and click on the Next button.
Here you can select SQL authentication or Windows. (either of these options works as long as it matches the aadbconf connection file) In this example we are selecting Windows authentication.
Test the connection and close out of ODBC.
Check the Advance connection string
Go to c:\Adv2000\aadbconf.exe double click to open the file.
If you are using Windows authentication in your ODBC, then remove the highlighted UID=admin; PWD=.
If you are using SQL authentication, then this is the correct connection string, and you should check your ODBC authentication.
Delete the ODBC connection and create a new one
If the above solution doesn't work, try deleting your ODBC connection and set up a new one.
See: Access APS: Unable to connect to database due to ‘Database Connection’ message appearing clicking the APS shortcut for information on how to do this.
Create a case online and reference the title of this article if any of the above does not resolve your issue.
