When I am trying to debug my mobile application , that used C# as programming language a notification beside the open the connection appeares and display that the module of it not loaded
and thank you

Dani AI

Generated

This thread’s “module not loaded” note next to SqlConn.Open() in a Compact Framework mobile debug session most often points to one of two root causes: the debugger hasn’t loaded symbols for the assembly (so breakpoints/symbols show as “not loaded”), or a required runtime/native provider isn’t present on the device/emulator. ’s hint about CF/Windows Mobile and ’s request for code were on target, and ’s final report (switching SDK and deploying an on-device DB) is consistent with a deployment/runtime issue rather than a C# syntax bug.

Two common scenarios and the matching provider patterns:

using System.Data.SqlServerCe;

using (var cn = new SqlCeConnection("Data Source=\\Program Files\\MyApp\\MyDb.sdf;"))
{
    cn.Open();
    // on-device SQL Server Compact (embedded .sdf)
}
using System.Data.SqlClient;

using (var cn = new SqlConnection("Server=192.168.1.100;Database=MyDb;User Id=sa;Password=..."))
{
    cn.Open();
    // remote SQL Server over network
}

Practical checklist for this exact symptom:

  • Verify which provider is intended (SqlCe vs SqlClient). Trying to open an .sdf with SqlConnection will fail.
  • Watch Visual Studio’s Output window and Debug → Windows → Modules during runtime. A module is shown as “not loaded” until it is actually loaded by the CLR/native loader.
  • Ensure Debug build, disable optimizations, and have PDBs available if stepping/breakpoints are required. Confirm project references have appropriate Copy Local behavior.
  • For embedded DBs, confirm the SQL Server Compact native runtime/CABs are installed on the device and match the device CPU (ARM vs x86). If the native DLLs are missing, the managed provider cannot load and Open() will fail.
  • Check emulator vs real device differences (network, installed components, SDK/CF version mismatches).

Common pitfalls: using desktop assemblies on-device, mismatched CF/SDK versions, or forgetting to deploy the .sdf (build action/content and copy settings). Useful diagnostic artifacts for follow-up are the exact exception/output text and the Modules list from the debugger.

Recommended Answers

All 6 Replies

>that the module of it not loaded..

Check CF and Window Mobile components. Maybe there is a possibility, that you might have to reinstalled the Compact Framework and Windows Mobile.

>that the module of it not loaded..

Check CF and Window Mobile components. Maybe there is a possibility, that you might have to reinstalled the Compact Framework and Windows Mobile.

thank you very mush for ur care
I think the problem that Windows mobile 6 needs visual studio 2005 or later and that not available at my machine So I uninstalled mobile 6 and installed mobile 5 and will try now thank you again you r so good man

thank you very mush for ur care
I think the problem that Windows mobile 6 needs visual studio 2005 or later and that not available at my machine So I uninstalled mobile 6 and installed mobile 5 and will try now thank you again you r so good man

please see this thread since its the cause of the problem demonstrated here
and thank you again you are so cute and jentle

http://www.daniweb.com/forums/thread261928.html


http://www.daniweb.com/forums/thread261928.html

Can you post some of your code? that way I could try and help you

>Can you post some of your code? that way I could try and help you

Please be more specific about your problem, and what better way than posting the code that you have tried so far? Please post the error trace.

>that the module of it not loaded..

Check CF and Window Mobile components. Maybe there is a possibility, that you might have to reinstalled the Compact Framework and Windows Mobile.

thank you very mush for ur care
I think the problem that Windows mobile 6 needs visual studio 2005 or later and that not available at my machine So I uninstalled mobile 6 and installed mobile 5 and will try now thank you again you r so good man

please see this thread since its the cause of the problem demonstrated here
and thank you again you are so cute and jentle

http://www.daniweb.com/forums/thread261928.html


http://www.daniweb.com/forums/thread261928.html

>Can you post some of your code? that way I could try and help you

Please be more specific about your problem, and what better way than posting the code that you have tried so far? Please post the error trace.

When I am trying to debug my mobile application , that used C# as programming language a notification beside the open the connection appeares and display that the module of it not loaded
and thank you

Can you post some of your code? that way I could try and help you

Thank you for all of you you are so gentl
I solved the problem to have a database on my device application
and this the way

step 1 : Create New database represents the database of my project
A- R-click on the project (not solution explorer)
B- Add new item
C-Choose Database file

Step 2 : from the Menue bar : Data -> Create new Data Source
following the wizard you can add the the file created in previous step as the new data Source

step 3 : from the Menue : Data -> ShowDataSource
a DataSet will appear on the left panel , R-click on it and choose
Edit DataSet with Designer

Step 4 : Add a dataTable for each column
Simply Right click on the DataSet Designer , and add required relations
Step 5 : Please see the following link and thank you in advance

http://www.codeproject.com/KB/mobile/loginsmartdevicedatabase.aspx?msg=3296512

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.