When I attempt to access the "Properties" of any connection, I encounter an "Error message dialog" stating, "attempt to write a readonly database." I'm using the latest version, 2023.3.39.0 64-bit. Recently, I logged into a new Windows account, which may have introduced permission issues with certain folders or files. I need to pinpoint the specific database file that triggered this error so I can investigate further.
The details:
SQLiteException - attempt to write a readonly database
attempt to write a readonly database
at System.Data.SQLite.SQLite3.Reset(SQLiteStatement stmt)
at System.Data.SQLite.SQLite3.Step(SQLiteStatement stmt)
at System.Data.SQLite.SQLiteDataReader.NextResult()
at System.Data.SQLite.SQLiteDataReader..ctor(SQLiteCommand cmd, CommandBehavior behave)
at System.Data.SQLite.SQLiteCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.SQLite.SQLiteCommand.ExecuteNonQuery(CommandBehavior behavior)
at Devolutions.RemoteDesktopManager.Business.DataSources.DatabaseConnectionDataSource.ExecuteNonQuery(String sql, IDbDataParameter[] parameters, Int32 commandTimeout)
at Devolutions.RemoteDesktopManager.Business.DataSources.SQLiteLogSubDataSource.InsertLog(LogConnectionInfo info, ConnectionLogMessage connectionLogMessage, Boolean logConnectionUsername)
at Devolutions.RemoteDesktopManager.Managers.LogManager.LogConnectionPropertiesViewed(Connection connection)
at Devolutions.RemoteDesktopManager.Managers.ActionManager.EditConnection(IConnectionSource source)
at Devolutions.RemoteDesktopManager.Managers.SessionMenuManager.MnuEditConnection_Click(Object sender, EventArgs e)
at DevExpress.XtraBars.BarItemLink.OnLinkClick()
at DevExpress.XtraBars.BarButtonItemLink.OnLinkAction(BarLinkAction action, Object actionArgs)
at DevExpress.XtraBars.ViewInfo.BarSelectionInfo.ClickLink(BarItemLink link)
at DevExpress.XtraBars.ViewInfo.BarSelectionInfo.UnPressLink(BarItemLink link)
at DevExpress.XtraBars.Controls.CustomLinksControl.OnMouseUp(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at DevExpress.XtraEditors.XtraControl.WndProc(Message& m)
at DevExpress.XtraBars.Controls.CustomControl.WndProc(Message& msg)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
------------------------ extended stack ------------------------
at Devolutions.RemoteDesktopManager.Managers.ErrorManager.BuildErrorDetails(Exception exception, String extraMessage)
at Devolutions.RemoteDesktopManager.Forms.FrmErrorMessage.ShowErrorMessage(Exception exception, String message, String title)
at Devolutions.RemoteDesktopManager.Managers.LogManager.OnThreadException(Object sender, ThreadExceptionEventArgs t)
at System.Windows.Forms.Application.ThreadContext.OnThreadException(Exception t)
at System.Windows.Forms.Control.WndProcException(Exception e)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at Devolutions.RemoteDesktopManager.Program.Main(String[] args)
Hello,
Could you verify if the sqlite file is not readonly?
Usually it's connection.db located %LocalAppData%\Devolutions\RemoteDesktopManager.
Regards
David Hervieux
Yes, I confirmed that connection.db located %LocalAppData%\Devolutions\RemoteDesktopManager is Not read-only and my new account has full control on it. Somehow I am still getting the error message. This happened after I switched to new account (old account deactivated). I've copied the folder of %LocalAppData%\Devolutions\RemoteDesktopManager from old account profile to new account profile.
Could you try to copy the database to another folder (just for a test) like C:\RDMData?
Regards
David Hervieux
I copied the database to another folder C:\RDMData, and renamed the original one. Launch RDM, I can see all the connections without specify the DB location (Why?), however click on any properties, still pops up the error.
Hello,
If you haven't changed the location, it still use the previous location since it's the default path.
Regards
David Hervieux
Questions:
Hello
If I can step in, I don't think RDM does shell expansion on the path (that is, the database path is stored in full).
So, is it possible that RDM is still pointing at the old connections.db in your deactivated user account?
If you choose File > Data Sources, then find your data source in the list and the path in use will be in the "Database" field. You can edit the Data Source and update the path accordingly.
Kind regards,
Richard Markievicz
Yes, you are right. RDM is still pointing at the old connections.db in my deactivated user account.
Problem solved. Thank you, Richard.
Hello
Good news!
Please don't hesitate if you have further questions or comments.
Kind regards,
Richard Markievicz