Link to home
Start Free TrialLog in
Avatar of mph23
mph23Flag for United States of America

asked on

Can't find PInvoke DLL 'sqlceme35.dll'

I am trying to add a database to my windows mobile 6.5 app but I'm getting this error when I try to deploy it to the  emulator. I am using VS 2008 Pro and Visual Basic.

System.MissingMethodException was unhandled
  Message="Can't find PInvoke DLL 'sqlceme35.dll'."
  StackTrace:
       at System.Data.SqlServerCe.SqlCeCommand..ctor()
       at ToolsSql2.ToolsSql2DataSetTableAdapters.usersTableAdapter.InitAdapter()
       at ToolsSql2.ToolsSql2DataSetTableAdapters.usersTableAdapter.get_Adapter()
       at ToolsSql2.ToolsSql2DataSetTableAdapters.usersTableAdapter.Fill(usersDataTable dataTable)
       at ToolsSql2.Form1.Form1_Load(Object sender, EventArgs e)
       at System.Windows.Forms.Form.OnLoad(EventArgs e)
       at System.Windows.Forms.Form._SetVisibleNotify(Boolean fVis)
       at System.Windows.Forms.Control.set_Visible(Boolean value)
       at System.Windows.Forms.Application.Run(Form fm)
       at ToolsSql2.Form1.Main()
  InnerException:

I saw a similar post id # 26325558 but his resolution was to upgrade from 3.0 to CE 3.5. I only installed 3.5.

My current dlls are in both:
C:\Program Files\Microsoft SQL Server Compact Edition\v3.5
C:\Program Files\Microsoft SQL Server Compact Edition\v3.5\Devices\wce500\armv4i

and I see sqlceme35.dll in those 2 directories?

My regedit shows:
HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft SQL Server Compact Edition/v3.5/ENU
(Default) Data = C:\Program Files\Microsoft SQL Server Compact Edition\v3.5\Devices

Do I need to install something for the  emulator? If so, how?
Do I install SSCERuntime-ENU or SSCEDeviceRuntime-ENU?


Avatar of hjgode
hjgode
Flag of Germany image

The DLLs on your PC cannot been seen by the emulator. You have to install the SQLCE runtime inside the Emulator first. You can setup a share in Emulator Settings and then copy the SQLCE Runtime installer (a cab file) to this dir and then access the dir inside the emulator using the Windows Mobile file explorer.

You can start the emulator manually, setup the share, install the runtime cab files for SQLCE 3.5 and then shutdown the emulator BUT select "Save State" to make the changes persistent for this emulator image. You may also simply select "Save State" in the emulators File menu.

See also here http://www.christec.co.nz/blog/archives/253 BUT the cab files for SQLCE 3.5 maybe named differently.

I am sorry, but I currently dont have the SQLCE 3.5 cab file names at my hand.

regards

Josef
ASKER CERTIFIED SOLUTION
Avatar of hjgode
hjgode
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial