Unable to load DLL 'sqlceme35.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
I'm new to ADO.NET and need help with this error.
Currently running Vista Home Premium 64 and Visual Studio 2008 Trial.
1. Create Win form app.
2. Add new data source...
3. New connection - SQL Server Compact 3.5 - Northwind.sdf
4. Highlight Products and Suppliers.
5. Drag both onto Win form
6. Run with debug
7. Error message "Unable to load DLL 'sqlceme35.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)"
some blogs advice change dir in SQL Server Compact 3.5 in regedit but regedit doesn't even have SQL Server Compact 3.5; only SQL Server\SQLExpress.
reinstall SQL Server Compact 3.5 and problem still exists.
anyone knows how to fix this problem?
Answers
installing SP1 for Sql Server Compact fixes the Vista64 bit problems for me
http://www.microsoft.com/downloads/details.aspx?FamilyId=DC614AEE-7E1C-4881-9C32-3A6CE53384D9&displaylang=en#filelist
- Proposed As Answer byExistMe Monday, April 27, 2009 7:43 PM
- Marked As Answer byErikEJMVP, ModeratorMonday, April 27, 2009 8:25 PM
Have you set your solution target to "Any CPU" ?? If so, set to "x86", as SQL Compact only runs in WoW mode on x64. Or use corflags.exe /32BIT+ against your project output (.exe file).
All Replies
Laxmi blogged about this issue here:
I installed the SP3 for SQL CE and even reinstalled it but problem still exists.
I don't understand this part:
"You are using Visual Studio Auto Deployment (F5) feature. And, VS has failed to map the System.Data.SqlServerCe.dll to the right set of cabs to install and just deployed the System.Data.SqlServerCe.dll alone (Note: No error is thrown). In this case, the native DLLs are not deployed.
a. Fix the auto-deployment issues (Don’t ask me how L)
b. Manually copy and install the SQL CE Cabs (all the 3 cabs). They are located under:
%VisualStudioInstallRoot%\SmartDevices\SDK\SQL Server\Mobile\v3.0\<platform>\<processor>"
Can you clarify to where all the 3 *.cab support to go to?
I'm seeing the same problem with Beta 2 of Visual Studio 2008 on Vista Ultimate x64.
I'm unclear about where the cab files go as well.
Jeff
Have you set your solution target to "Any CPU" ?? If so, set to "x86", as SQL Compact only runs in WoW mode on x64. Or use corflags.exe /32BIT+ against your project output (.exe file).
set to x86 and it works....thanks
- Maybe I'm dumb, but I can't seem to find this option.
Under Advance Compile Options the only thing I see similar to this is Target Framework, but that doesn't fix it either.
I'm running VS2008 Express under Vista Ultimate x64 - It is part of the solution configuration, not project properties. "Configuration Manager" (that's what you need) is usually available via the dropdown saying "Debug", "Release" For more info see: http://msdn2.microsoft.com/en-us/library/t1hy4dhz.aspx
Or you can use corflags.exe /32BIT+ against your .exe file after build and before deployment.
I'm using the MV2008trial but i think the layout still the same.
You should be able to see a button on your toolbar that looks like a "play button" (start debugging) next to it you should see a drop down box said "Debug" and next to it is another drop down box and its default value is Any CPU; set this to x86.
this works on mine.
- I can't find this anywhere. I'm assuming it must be because it the express edition. Downloading the trial now...
- Found it... had to enable advance build configurations under options... thanks guys.
- ive tried everything stated here but no luck, i still cant run my solution, keep getting:
An error occurred creating the form. See Exception.InnerException for details. The error is: Unable to load DLL 'sqlceme35.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
Plus, in the compiler, advanced compiler options i cant switch the Target CPU, its fixed to "Any CPU"
Im using Windows Vista Business 64 and Visual Basic 2008 Express Edition I had the same problem in Ulimate. Try this.
In drop nemu "Build" is "Configuration Manager". You will see the tabel where one of columns is the column "platform" with Any CPU. There is drop menu. Use "New" option a then change this option on x86. It helps me. Close Configuration manager and try.
- Proposed As Answer byBacter Tuesday, May 05, 2009 12:54 PM
- Look at this blog post for a walk-through: http://erikej.blogspot.com/2008/01/x64-and-sql-compact.html
ErikEJ wrote: Have you set your solution target to "Any CPU" ?? If so, set to "x86", as SQL Compact only runs in WoW mode on x64. Or use corflags.exe /32BIT+ against your project output (.exe file).
ErikEJ wrote: Look at this blog post for a walk-through: http://erikej.blogspot.com/2008/01/x64-and-sql-compact.html Hello everyone,
I have the same problem as mentioned above "Unable to load DLL 'elev.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E) ", when trying to load the dll file into a window application. I developed a window application in VS2005 and want to import a dll file from another program into my project and use it. But when I try to call one of the function in the dll file, I got the error message "Unable to load dll 'elev.dll". I try all options that say it works to solve this problem, but somehow it doesn't work for me. I put the "elev.dll" file in the bin folder and use P/Invoke to import the dll file into my project. Can anyone help me out with this? thanks and really appreciated!
Here is how I import the dll:
[
DllImport(@"D:\elev.dll")] //[DllImport("emap.dll", SetLastError = true)] private static extern void EMA_Init();and in the code, I call the function above but failed to load the dll file
EMA_Init();
- I am new to programing of any kind. You link did the trick, once I actually read it. Thank you.
- Hi all,
i also get stuck with this... at last i get it work.
you may need to copy *.dll from C:\Program Files\Microsoft SQL Server Compact Edition\v3.5
to C:\Program Files\Microsoft Visual Studio 8\Common7\IDE (For VS2005)
or C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE (For VS2008)
That's it.
Hope this helps,
-Jirapong installing SP1 for Sql Server Compact fixes the Vista64 bit problems for me
http://www.microsoft.com/downloads/details.aspx?FamilyId=DC614AEE-7E1C-4881-9C32-3A6CE53384D9&displaylang=en#filelist
- Proposed As Answer byExistMe Monday, April 27, 2009 7:43 PM
- Marked As Answer byErikEJMVP, ModeratorMonday, April 27, 2009 8:25 PM
Thankyou adam75 actually it solved my problem on my 64bit vista machine.installing SP1 for Sql Server Compact fixes the Vista64 bit problems for me
http://www.microsoft.com/downloads/details.aspx?FamilyId=DC614AEE-7E1C-4881-9C32-3A6CE53384D9&displaylang=en#filelist
- The really good news is that they haven't fixed this in Windows 7, but this fix works in 7 rc1.
You have to install both the x86 and x64 patches. - Hello,
I am seeing a similar issue except for 32 bit machines.
Installing the service pack for sql compact from the link (http://www.microsoft.com/downloads/details.aspx?FamilyId=DC614AEE-7E1C-4881-9C32-3A6CE53384D9&displaylang=en#filelist) resolves the issue but when sql compact is installed through the click once, it gives this error("Unable to load DLL 'sqlceme35.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)").
We are trying to have an application where everything for the application is installed through the click once technology, but it does seem that this doesn't want to work.
Does anyone have any ideas why this install won't work on certain machines through the click once?
thx!
Hugh Fairifeld - You'll have to install the x64 version of SQL Compact. Ask more questions about it in this forum.
Hans Passant. - There are posts that over complicate this issue.
The problem is that you are using a 64 bit operating system, but have installed the 32 bit version of SQL Server Compact Express. When you attempt to run a windows form application in Visual Basic 2008, windows can not find the correct file. Though you can develop with the standard 32 bit version of SQL Server Compact Express using a 64 bit operating system, you must have a separate program to run what you develop.
Solution:
Download and install a program that allows a 64 bit operating system to run SQL Server Compact Express (.sdf).
Here is the link: http://www.microsoft.com/downloads/details.aspx?FamilyId=DC614AEE-7E1C-4881-9C32-3A6CE53384D9&displaylang=en#filelist
This also fixes the problem for me on Windows Server 2008 R2 x64.installing SP1 for Sql Server Compact fixes the Vista64 bit problems for me
http://www.microsoft.com/downloads/details.aspx?FamilyId=DC614AEE-7E1C-4881-9C32-3A6CE53384D9&displaylang=en#filelist
- Edited byJon Sagara Tuesday, September 08, 2009 9:28 PMSpecified that I'm using x64
- Erik, you are the man! Thank you so much for providing the solution to the "sqlceme35.dll not found" exception. Now I don't have to fork over 60 bucks to migrate to Liberty BASIC.
I am writing an application in VB using Visual Studio 8. I cannot run the published application on any 64 bit machine. I have changed the solution target to "x86" as per your blog using the instructions you have given and it still will not run. I bought a new 64 bit system to test with and it still will not run. I get this message no matter what I have tried to do. "Unable to load DLL 'sqlceme35.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)" I originally created the application on a 32 bit machine and then loaded the Visual studio application onto the 64 bit system to publish from there and it will run in debug mode within visual studio no matter what settings I use for the target solution but whenever I try to publish it the publisher shows "Any CPU" as the configuration and will not run when I install the application. I am using the "One Click" deployment option from a CD to deploy the application. I have even rewritten the entire application with the target platform set to "x86" to no avail. I have spent many hours on this problem and I must find a solution. To not run on a 64 bit system is not acceptable. Any ideas on what I am doing wrong? Will Microsoft ever address this issue? I am using the SQL compact edition database and I understand this is the problem with the database. My application still starts if I ignore the error but of course no data is present. Any help you can give me will be appreciated. I cannot expect the users to use the "corflags.exe /32BIT+ solution because I cannot even get that to work. I am new to the .Net world and cannot get the corflags.exe command to work no matter where I type the command. Is this something I can do to my .exe file before I place on the CD to deploy? If so maybe some more detailed instructions on how to do this will help. Thank you in advance for anything you can tell me.
- Hi,
I am working with SQL Compact 3.5 on Windows 7 x64 build, and I had this same error. The steps I took based on this topic worked.
I installed Sql Compat 3.5 SP1, opened up my project, under the configuration manager I set my CPU to x86, ran the project again and the DLL error was gone, and my program was working perfectly.
Thanks for the help. - Thanks Erik! That fixed the problem!

