Skip to main content

Practice Management: Error: 'Object cannot be cast from DBNull to other types when opening Central console'

Error - Object cannot be cast from DBNull to other types when opening central console

Updated over a month ago

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()

image.png


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

  1. Go to C:\windows\Syswow64\odbcad32.exe double click to open.

  2. Go to System tab and select the ODBC connection aps_dsql.

  3. Select Configure and click on the Next button.

  4. 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.

  5. Test the connection and close out of ODBC.



Check the Advance connection string

  1. Go to c:\Adv2000\aadbconf.exe double click to open the file.

  2. If you are using Windows authentication in your ODBC, then remove the highlighted UID=admin; PWD=.

    image.png
  3. 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.




Did this answer your question?