dokan-dev / dokany

User mode file system library for windows with FUSE Wrapper
http://dokan-dev.github.io
5.21k stars 661 forks source link

Mssql CE cannot connect to db on dokan mirror due to way too long path(but it's not) #1048

Closed enyar-boop closed 2 years ago

enyar-boop commented 2 years ago

Environment

Check List

Description

We work with Nanocad's extension "BIM", and they use MSSQL CE. When we try to use "Nanocad BIM"(connect to mssql CE on the mirrored disk) on mirror it gives us following error. I'm alsow attaching the instruction and needed code extract from "nanocad bim"s dll(we conctacted them first, they gave us code sample that they use, i'll attach sample project and compilled exe from them)

  1. Get their CE created db extracted wherever you want CE_db.zip
  2. Mirror the folder where CE_db is extracted( i used "mirror.exe /d /s /r C:\ /l m" but it also worked without debug and as removable drive flags)
  3. Exctract "Nanocad BIM"s sample, start compiled exe or compile it yourself from their source code and then select the "999999999.sdf" from CE_db through mirrored disk, it should tell you that there is an error, otherwise it'll say all's ok. ExeAndProjectCodeSample.zip sorry for numeric names, needed to exclude cyrillic.

We tried to find some info about it and found out that it might be a known issue with RAMdrivers https://social.msdn.microsoft.com/Forums/en-US/8d6d9063-600c-49ba-97e9-d0ecfa9a5953/vs2010-quotpath-is-to-longdatabase1sdf-quot-sql-server-compact-edition-with-qsoft?forum=csharpide

Cad платформа: NanoCad 21.0
Продукт: nanoCAD BIM ОПС
Версия продукта: 21.0.5257.5257 x64
Версия ОС: Microsoft Windows NT 6.2.9200.0 x64

=========================================
Exception: System.Data.SqlServerCe.SqlCeException (0x80004005): The file resolves to a path that is too long. The maximum length is 260 characters. [ File name = M:\111\999999999\999999999.sdf ]
   в System.Data.SqlServerCe.SqlCeConnection.ProcessResults(Int32 hr)
   в System.Data.SqlServerCe.SqlCeConnection.Open(Boolean silent)
   в System.Data.SqlServerCe.SqlCeConnection.Open()
   в Cadwise.Data.DataSource.DeserializeSdf()
   в Cadwise.Data.DataSource.Deserialize()
   в Cadwise.Studio.Tree.PersistentItem.Open(String path)
===================================Stack trace================================
   в System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
   в System.Environment.get_StackTrace()
   в Cadwise.Studio.Utils.ExceptionLogger.GetInfo(Exception exception, String description)
   в Cadwise.Studio.Utils.ExceptionLogger.Log(Exception exception, String description)
   в Cadwise.Studio.Utils.ExceptionLogger.Log(Exception exception)
   в Cadwise.Studio.Tree.PersistentItem.Open(String path)
   в Cadwise.Data.DataSource.Open(String path)
   в Cadwise.Data.DataBaseDocument.Open(String url)
   в Cadwise.Data.DataBaseSerializer.Deserialize(String fileName)
   в Cadwise.Studio.Solution.Document`1.Deserialize()
   в Cadwise.Studio.Solution.PersistentItem`1.Open(String path)
   в Cadwise.CAE.CaeProjectItemManager.OpenDb(IProject project, String fileName, Type type)
   в Cadwise.OPS.AddIn.Modul.OpsAddIn.SetupProject(IProject project)
   в Cadwise.OPS.AddIn.Modul.OpsAddIn.ProjectEvents_ProjectOpened(IProject project)
   в Cadwise.Studio.Core.Events.ProjectHandler.Invoke(IProject project)
   в Cadwise.Studio.Solution.Workspace.AddFromFile(String path)
   в Cadwise.Studio.Solution.Workspace.Deserialize()
   в Cadwise.Studio.Solution.PersistentItem`1.Open(String path)
   в Cadwise.Studio.Solution.Workspace.Open(String path, Boolean saveToHistory)
   в Cadwise.Studio.Solution.Workspace.Open(String path)
   в Cadwise.Studio.Core.Solution.Commands.OpenSolutionCommand.Do()
   в Cadwise.Studio.Core.CommandProcessor.DoCommand(ICommand command)
   в Cadwise.Studio.Core.CommandProcessor.ExecuteCommand(ICommand command)
   в Cadwise.Studio.UI.Bars.ControlAdapter.Execute()
   в System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   в System.Windows.Forms.ToolStripButton.OnClick(EventArgs e)
   в System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   в System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
   в System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
   в System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   в System.Windows.Forms.Control.WndProc(Message& m)
   в System.Windows.Forms.ToolStrip.WndProc(Message& m)
   в System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Our problem fully doable on mirror sample so no need to worry about our implementation.

Logs

mirror debug.txt

Liryna commented 2 years ago

Hi @enyar-boop ,

You just need to use the mount manager option /o and then the app successfully open the db. Let me know if it also works on your side.

enyar-boop commented 2 years ago

I feel dumb now, maount manager + fixed drive fixed the problem, thank you very much