Discussion:
Can't load sqlcese35.dll
(too old to reply)
PulsingTempleVein
2010-03-21 18:24:01 UTC
Permalink
I am failing miserably at getting SQL compact to work on my new headless
hardware.

CE 6.0 R3, Updates to Dec 2009 Rollup
Hardware is a Headless x86 device (iCop VDX-6315)

Included in the OS image that I am building:

SQL Compact
SQL Compact Managed Provider
.NET Compact Framework 3.5 Headless
.NET Compact Framework String Resources - Headless
OS Dependencies for .NET Compact Framework 3.5 - Headless

Using Hive based registry

I have an application (using SQL ce) that I have been running on an x86
system with a display for two years, I hit this problem when I first tried to
run it on the headless device. To simplify things I made a test application
(VS2008) which is basically the Microsoft example using the northwind
database.

I do not get the dreaded PInvoke error but I get this on connection.Open():

System.Data.SqlServerCe.SqlCeException was unhandled
Message="A SQL Server Compact DLL could not be loaded. Reinstall SQL
Server Compact Edition. [ DLL Name = sqlcese35.sys.dll ]"
HResult=-2147467259
NativeError=25123
Source="SQL Server Compact ADO.NET Data Provider"
StackTrace:
at System.Data.SqlServerCe.SqlCeConnection.ProcessResults(Int32 hr)
at System.Data.SqlServerCe.SqlCeConnection.Open(Boolean silent)
at System.Data.SqlServerCe.SqlCeConnection.Open()

I have tried to install the 3 sqlce CAB files using the command line version
of wceload but when I do this I get
Failed to add assembly: System.Data.SqlServerCe.Resources.dll

putting the sqlcese35.dll in the application directory doesn't work ( have
tried putting all the dll's in with the app)

I wrote an app that just tries to load the dll's with LoadLibrary like this:

private static void PreLoadSqlCe()
{
string sqlCeInstallPath =
(string)Registry.GetValue(@"HKEY_LOCAL_MACHINE\Software\Microsoft\Microsoft
SQL Server Compact Edition\v3.5",
"InstallDir", string.Empty);

if (string.IsNullOrEmpty(sqlCeInstallPath))
{
return;

}



string[] sqlCeDlls = new string[]

{
"sqlceoledb35.dll",
"sqlcese35.dll",
"sqlceqp35.dll",
"sqlceme35.dll",
"sqlceca35.dll",
"sqlcecompact35.dll"
};

foreach (string dllName in sqlCeDlls)
{
Debug.WriteLine("--> Preloading SqlCe DLL: " + dllName);

string fullPath = Path.Combine(sqlCeInstallPath, dllName);

IntPtr result = LoadLibrary(fullPath);

if (result != IntPtr.Zero)
{

Debug.WriteLine(string.Format("An error occurred while
pre-loading the native DLL '{0}' Error{1}.",
dllName,Marshal.GetLastWin32Error()));
}



if (File.Exists(fullPath))
{
FileVersionInfo info =
FileVersionInfo.GetVersionInfo(fullPath);
Debug.WriteLine(info.FileName);
Debug.WriteLine(string.Format("Build:{0} Major:{1}
Minor:{2}", info.FileBuildPart, info.FileMajorPart, info.FileMinorPart));
Debug.WriteLine(string.Format("PBuild:{0} PMajor:{1}
PMinor:{2}", info.ProductBuildPart, info.ProductMajorPart,
info.ProductMinorPart));
}

}

}

Output from this code is:
--> Preloading SqlCe DLL: sqlceoledb35.dll
An error occurred while pre-loading the native DLL 'sqlceoledb35.dll' Error0.
sqlceoledb35.dll
Build:5692 Major:3 Minor:5
PBuild:5692 PMajor:3 PMinor:5
--> Preloading SqlCe DLL: sqlcese35.dll
sqlcese35.dll
Build:5692 Major:3 Minor:5
PBuild:5692 PMajor:3 PMinor:5
--> Preloading SqlCe DLL: sqlceqp35.dll
An error occurred while pre-loading the native DLL 'sqlceqp35.dll' Error87.
sqlceqp35.dll
Build:5692 Major:3 Minor:5
PBuild:5692 PMajor:3 PMinor:5
--> Preloading SqlCe DLL: sqlceme35.dll
An error occurred while pre-loading the native DLL 'sqlceme35.dll' Error87.
sqlceme35.dll
Build:5692 Major:3 Minor:5
PBuild:5692 PMajor:3 PMinor:5
--> Preloading SqlCe DLL: sqlceca35.dll
sqlceca35.dll
Build:5692 Major:3 Minor:5
PBuild:5692 PMajor:3 PMinor:5
--> Preloading SqlCe DLL: sqlcecompact35.dll
An error occurred while pre-loading the native DLL 'sqlcecompact35.dll'
Error87.
sqlcecompact35.dll
Build:5692 Major:3 Minor:5
PBuild:5692 PMajor:3 PMinor:5

I also used opennetcf's smart device framework to look at the memory load as
I read that insufficient virtual memory would cause a dll to fail to load.
This is the output directly after the Open exception:

Available Physical Memory:114MB
Availabel Virtual Memory:1041MB
MemoryLoad:8
System Program Memory:121MB
SystemStorageMemory:121MB
Total Physical Memory:124MB
Total Virtual Memory:1048MB

I'm at my wits end and considering sending a jug of Maple syrup to the first
person that helps me figure this out......
ErikEJ
2010-03-22 06:10:01 UTC
Permalink
And you are using the files from:

C:\Program Files\Microsoft SQL Server Compact
Edition\v3.5\Devices\wce500\x86 ?
--
Erik Ejlskov Jensen, Mobile App Dev MCTS
Check out my SQL Compact blog at
http://erikej.blogspot.com
Post by PulsingTempleVein
I am failing miserably at getting SQL compact to work on my new headless
hardware.
CE 6.0 R3, Updates to Dec 2009 Rollup
Hardware is a Headless x86 device (iCop VDX-6315)
SQL Compact
SQL Compact Managed Provider
.NET Compact Framework 3.5 Headless
.NET Compact Framework String Resources - Headless
OS Dependencies for .NET Compact Framework 3.5 - Headless
Using Hive based registry
I have an application (using SQL ce) that I have been running on an x86
system with a display for two years, I hit this problem when I first tried to
run it on the headless device. To simplify things I made a test application
(VS2008) which is basically the Microsoft example using the northwind
database.
I do not get the dreaded PInvoke error but I get this on
System.Data.SqlServerCe.SqlCeException was unhandled
Message="A SQL Server Compact DLL could not be loaded. Reinstall SQL
Server Compact Edition. [ DLL Name = sqlcese35.sys.dll ]"
HResult=-2147467259
NativeError=25123
Source="SQL Server Compact ADO.NET Data Provider"
at System.Data.SqlServerCe.SqlCeConnection.ProcessResults(Int32 hr)
at System.Data.SqlServerCe.SqlCeConnection.Open(Boolean silent)
at System.Data.SqlServerCe.SqlCeConnection.Open()
I have tried to install the 3 sqlce CAB files using the command line version
of wceload but when I do this I get
Failed to add assembly: System.Data.SqlServerCe.Resources.dll
putting the sqlcese35.dll in the application directory doesn't work ( have
tried putting all the dll's in with the app)
private static void PreLoadSqlCe()
{
string sqlCeInstallPath =
SQL Server Compact Edition\v3.5",
"InstallDir", string.Empty);
if (string.IsNullOrEmpty(sqlCeInstallPath))
{
return;
}
string[] sqlCeDlls = new string[]
{
"sqlceoledb35.dll",
"sqlcese35.dll",
"sqlceqp35.dll",
"sqlceme35.dll",
"sqlceca35.dll",
"sqlcecompact35.dll"
};
foreach (string dllName in sqlCeDlls)
{
Debug.WriteLine("--> Preloading SqlCe DLL: " + dllName);
string fullPath = Path.Combine(sqlCeInstallPath, dllName);
IntPtr result = LoadLibrary(fullPath);
if (result != IntPtr.Zero)
{
Debug.WriteLine(string.Format("An error occurred while
pre-loading the native DLL '{0}' Error{1}.",
dllName,Marshal.GetLastWin32Error()));
}
if (File.Exists(fullPath))
{
FileVersionInfo info =
FileVersionInfo.GetVersionInfo(fullPath);
Debug.WriteLine(info.FileName);
Debug.WriteLine(string.Format("Build:{0} Major:{1}
Minor:{2}", info.FileBuildPart, info.FileMajorPart, info.FileMinorPart));
Debug.WriteLine(string.Format("PBuild:{0} PMajor:{1}
PMinor:{2}", info.ProductBuildPart, info.ProductMajorPart,
info.ProductMinorPart));
}
}
}
--> Preloading SqlCe DLL: sqlceoledb35.dll
An error occurred while pre-loading the native DLL 'sqlceoledb35.dll' Error0.
sqlceoledb35.dll
Build:5692 Major:3 Minor:5
PBuild:5692 PMajor:3 PMinor:5
--> Preloading SqlCe DLL: sqlcese35.dll
sqlcese35.dll
Build:5692 Major:3 Minor:5
PBuild:5692 PMajor:3 PMinor:5
--> Preloading SqlCe DLL: sqlceqp35.dll
An error occurred while pre-loading the native DLL 'sqlceqp35.dll' Error87.
sqlceqp35.dll
Build:5692 Major:3 Minor:5
PBuild:5692 PMajor:3 PMinor:5
--> Preloading SqlCe DLL: sqlceme35.dll
An error occurred while pre-loading the native DLL 'sqlceme35.dll' Error87.
sqlceme35.dll
Build:5692 Major:3 Minor:5
PBuild:5692 PMajor:3 PMinor:5
--> Preloading SqlCe DLL: sqlceca35.dll
sqlceca35.dll
Build:5692 Major:3 Minor:5
PBuild:5692 PMajor:3 PMinor:5
--> Preloading SqlCe DLL: sqlcecompact35.dll
An error occurred while pre-loading the native DLL 'sqlcecompact35.dll'
Error87.
sqlcecompact35.dll
Build:5692 Major:3 Minor:5
PBuild:5692 PMajor:3 PMinor:5
I also used opennetcf's smart device framework to look at the memory load as
I read that insufficient virtual memory would cause a dll to fail to load.
Available Physical Memory:114MB
Availabel Virtual Memory:1041MB
MemoryLoad:8
System Program Memory:121MB
SystemStorageMemory:121MB
Total Physical Memory:124MB
Total Virtual Memory:1048MB
I'm at my wits end and considering sending a jug of Maple syrup to the first
person that helps me figure this out......
PulsingTempleVein
2010-03-22 13:23:01 UTC
Permalink
Yes I am, File Version(s) 3.4.5692.0

After I build the OS and copy it to my drive the following files exist in
\windows\
and the registry looks correct with the installdir as \windows\

03/21/10 05:43p 1668 SQLServerCompact 3.5 Core.unload
06/25/08 08:21a 263608
GAC_System.Data.SqlServerCe_v3_5_1_0_cneutral_1.dll
03/21/10 05:43p 1002 SQLServerCompact 3.5 Repl.unload
03/21/10 05:43p 1590 SQLServerCompact 3.5 Tools EN.unload
09/02/09 11:04p 385960 sqlceca35.dll
09/02/09 11:04p 84392 sqlcecompact35.dll
09/02/09 11:04p 145320 sqlceer35en.dll
09/02/09 11:04p 56232 sqlceme35.dll
09/02/09 11:04p 181160 sqlceoledb35.dll
09/02/09 11:04p 753064 sqlceqp35.dll
09/02/09 11:04p 328616 sqlcese35.dll


I have a working FTP server so I can browse the device in windows explorer
but I can't see the version of these files. They are also hidden and I can't
change their attributes so I can't copy them with to my development machine
to check the version.
Post by ErikEJ
C:\Program Files\Microsoft SQL Server Compact
Edition\v3.5\Devices\wce500\x86 ?
--
Erik Ejlskov Jensen, Mobile App Dev MCTS
Check out my SQL Compact blog at
http://erikej.blogspot.com
Post by PulsingTempleVein
I am failing miserably at getting SQL compact to work on my new headless
hardware.
CE 6.0 R3, Updates to Dec 2009 Rollup
Hardware is a Headless x86 device (iCop VDX-6315)
SQL Compact
SQL Compact Managed Provider
.NET Compact Framework 3.5 Headless
.NET Compact Framework String Resources - Headless
OS Dependencies for .NET Compact Framework 3.5 - Headless
Using Hive based registry
I have an application (using SQL ce) that I have been running on an x86
system with a display for two years, I hit this problem when I first tried to
run it on the headless device. To simplify things I made a test application
(VS2008) which is basically the Microsoft example using the northwind
database.
I do not get the dreaded PInvoke error but I get this on
System.Data.SqlServerCe.SqlCeException was unhandled
Message="A SQL Server Compact DLL could not be loaded. Reinstall SQL
Server Compact Edition. [ DLL Name = sqlcese35.sys.dll ]"
HResult=-2147467259
NativeError=25123
Source="SQL Server Compact ADO.NET Data Provider"
at System.Data.SqlServerCe.SqlCeConnection.ProcessResults(Int32 hr)
at System.Data.SqlServerCe.SqlCeConnection.Open(Boolean silent)
at System.Data.SqlServerCe.SqlCeConnection.Open()
I have tried to install the 3 sqlce CAB files using the command line version
of wceload but when I do this I get
Failed to add assembly: System.Data.SqlServerCe.Resources.dll
putting the sqlcese35.dll in the application directory doesn't work ( have
tried putting all the dll's in with the app)
private static void PreLoadSqlCe()
{
string sqlCeInstallPath =
SQL Server Compact Edition\v3.5",
"InstallDir", string.Empty);
if (string.IsNullOrEmpty(sqlCeInstallPath))
{
return;
}
string[] sqlCeDlls = new string[]
{
"sqlceoledb35.dll",
"sqlcese35.dll",
"sqlceqp35.dll",
"sqlceme35.dll",
"sqlceca35.dll",
"sqlcecompact35.dll"
};
foreach (string dllName in sqlCeDlls)
{
Debug.WriteLine("--> Preloading SqlCe DLL: " + dllName);
string fullPath = Path.Combine(sqlCeInstallPath, dllName);
IntPtr result = LoadLibrary(fullPath);
if (result != IntPtr.Zero)
{
Debug.WriteLine(string.Format("An error occurred while
pre-loading the native DLL '{0}' Error{1}.",
dllName,Marshal.GetLastWin32Error()));
}
if (File.Exists(fullPath))
{
FileVersionInfo info =
FileVersionInfo.GetVersionInfo(fullPath);
Debug.WriteLine(info.FileName);
Debug.WriteLine(string.Format("Build:{0} Major:{1}
Minor:{2}", info.FileBuildPart, info.FileMajorPart, info.FileMinorPart));
Debug.WriteLine(string.Format("PBuild:{0} PMajor:{1}
PMinor:{2}", info.ProductBuildPart, info.ProductMajorPart,
info.ProductMinorPart));
}
}
}
--> Preloading SqlCe DLL: sqlceoledb35.dll
An error occurred while pre-loading the native DLL 'sqlceoledb35.dll' Error0.
sqlceoledb35.dll
Build:5692 Major:3 Minor:5
PBuild:5692 PMajor:3 PMinor:5
--> Preloading SqlCe DLL: sqlcese35.dll
sqlcese35.dll
Build:5692 Major:3 Minor:5
PBuild:5692 PMajor:3 PMinor:5
--> Preloading SqlCe DLL: sqlceqp35.dll
An error occurred while pre-loading the native DLL 'sqlceqp35.dll' Error87.
sqlceqp35.dll
Build:5692 Major:3 Minor:5
PBuild:5692 PMajor:3 PMinor:5
--> Preloading SqlCe DLL: sqlceme35.dll
An error occurred while pre-loading the native DLL 'sqlceme35.dll' Error87.
sqlceme35.dll
Build:5692 Major:3 Minor:5
PBuild:5692 PMajor:3 PMinor:5
--> Preloading SqlCe DLL: sqlceca35.dll
sqlceca35.dll
Build:5692 Major:3 Minor:5
PBuild:5692 PMajor:3 PMinor:5
--> Preloading SqlCe DLL: sqlcecompact35.dll
An error occurred while pre-loading the native DLL 'sqlcecompact35.dll'
Error87.
sqlcecompact35.dll
Build:5692 Major:3 Minor:5
PBuild:5692 PMajor:3 PMinor:5
I also used opennetcf's smart device framework to look at the memory load as
I read that insufficient virtual memory would cause a dll to fail to load.
Available Physical Memory:114MB
Availabel Virtual Memory:1041MB
MemoryLoad:8
System Program Memory:121MB
SystemStorageMemory:121MB
Total Physical Memory:124MB
Total Virtual Memory:1048MB
I'm at my wits end and considering sending a jug of Maple syrup to the first
person that helps me figure this out......
.
The Mad Ape
2010-03-26 22:47:48 UTC
Permalink
I had a similar problem. After uninstalling I used ccleaner (free tool
google it) to repair my registry and then reinstalled. Then did a system
reboot and voila.
Post by PulsingTempleVein
Yes I am, File Version(s) 3.4.5692.0
After I build the OS and copy it to my drive the following files exist in
\windows\
and the registry looks correct with the installdir as \windows\
03/21/10 05:43p 1668 SQLServerCompact 3.5 Core.unload
06/25/08 08:21a 263608
GAC_System.Data.SqlServerCe_v3_5_1_0_cneutral_1.dll
03/21/10 05:43p 1002 SQLServerCompact 3.5 Repl.unload
03/21/10 05:43p 1590 SQLServerCompact 3.5 Tools EN.unload
09/02/09 11:04p 385960 sqlceca35.dll
09/02/09 11:04p 84392 sqlcecompact35.dll
09/02/09 11:04p 145320 sqlceer35en.dll
09/02/09 11:04p 56232 sqlceme35.dll
09/02/09 11:04p 181160 sqlceoledb35.dll
09/02/09 11:04p 753064 sqlceqp35.dll
09/02/09 11:04p 328616 sqlcese35.dll
I have a working FTP server so I can browse the device in windows explorer
but I can't see the version of these files. They are also hidden and I can't
change their attributes so I can't copy them with to my development machine
to check the version.
Post by ErikEJ
C:\Program Files\Microsoft SQL Server Compact
Edition\v3.5\Devices\wce500\x86 ?
--
Erik Ejlskov Jensen, Mobile App Dev MCTS
Check out my SQL Compact blog at
http://erikej.blogspot.com
Post by PulsingTempleVein
I am failing miserably at getting SQL compact to work on my new headless
hardware.
CE 6.0 R3, Updates to Dec 2009 Rollup
Hardware is a Headless x86 device (iCop VDX-6315)
SQL Compact
SQL Compact Managed Provider
.NET Compact Framework 3.5 Headless
.NET Compact Framework String Resources - Headless
OS Dependencies for .NET Compact Framework 3.5 - Headless
Using Hive based registry
I have an application (using SQL ce) that I have been running on an x86
system with a display for two years, I hit this problem when I first tried to
run it on the headless device. To simplify things I made a test application
(VS2008) which is basically the Microsoft example using the northwind
database.
I do not get the dreaded PInvoke error but I get this on
System.Data.SqlServerCe.SqlCeException was unhandled
Message="A SQL Server Compact DLL could not be loaded. Reinstall SQL
Server Compact Edition. [ DLL Name = sqlcese35.sys.dll ]"
HResult=-2147467259
NativeError=25123
Source="SQL Server Compact ADO.NET Data Provider"
at System.Data.SqlServerCe.SqlCeConnection.ProcessResults(Int32 hr)
at System.Data.SqlServerCe.SqlCeConnection.Open(Boolean silent)
at System.Data.SqlServerCe.SqlCeConnection.Open()
I have tried to install the 3 sqlce CAB files using the command line version
of wceload but when I do this I get
Failed to add assembly: System.Data.SqlServerCe.Resources.dll
putting the sqlcese35.dll in the application directory doesn't work ( have
tried putting all the dll's in with the app)
private static void PreLoadSqlCe()
{
string sqlCeInstallPath =
SQL Server Compact Edition\v3.5",
"InstallDir", string.Empty);
if (string.IsNullOrEmpty(sqlCeInstallPath))
{
return;
}
string[] sqlCeDlls = new string[]
{
"sqlceoledb35.dll",
"sqlcese35.dll",
"sqlceqp35.dll",
"sqlceme35.dll",
"sqlceca35.dll",
"sqlcecompact35.dll"
};
foreach (string dllName in sqlCeDlls)
{
Debug.WriteLine("--> Preloading SqlCe DLL: " + dllName);
string fullPath = Path.Combine(sqlCeInstallPath, dllName);
IntPtr result = LoadLibrary(fullPath);
if (result != IntPtr.Zero)
{
Debug.WriteLine(string.Format("An error occurred while
pre-loading the native DLL '{0}' Error{1}.",
dllName,Marshal.GetLastWin32Error()));
}
if (File.Exists(fullPath))
{
FileVersionInfo info =
FileVersionInfo.GetVersionInfo(fullPath);
Debug.WriteLine(info.FileName);
Debug.WriteLine(string.Format("Build:{0} Major:{1}
Minor:{2}", info.FileBuildPart, info.FileMajorPart, info.FileMinorPart));
Debug.WriteLine(string.Format("PBuild:{0} PMajor:{1}
PMinor:{2}", info.ProductBuildPart, info.ProductMajorPart,
info.ProductMinorPart));
}
}
}
--> Preloading SqlCe DLL: sqlceoledb35.dll
An error occurred while pre-loading the native DLL 'sqlceoledb35.dll' Error0.
sqlceoledb35.dll
Build:5692 Major:3 Minor:5
PBuild:5692 PMajor:3 PMinor:5
--> Preloading SqlCe DLL: sqlcese35.dll
sqlcese35.dll
Build:5692 Major:3 Minor:5
PBuild:5692 PMajor:3 PMinor:5
--> Preloading SqlCe DLL: sqlceqp35.dll
An error occurred while pre-loading the native DLL 'sqlceqp35.dll' Error87.
sqlceqp35.dll
Build:5692 Major:3 Minor:5
PBuild:5692 PMajor:3 PMinor:5
--> Preloading SqlCe DLL: sqlceme35.dll
An error occurred while pre-loading the native DLL 'sqlceme35.dll' Error87.
sqlceme35.dll
Build:5692 Major:3 Minor:5
PBuild:5692 PMajor:3 PMinor:5
--> Preloading SqlCe DLL: sqlceca35.dll
sqlceca35.dll
Build:5692 Major:3 Minor:5
PBuild:5692 PMajor:3 PMinor:5
--> Preloading SqlCe DLL: sqlcecompact35.dll
An error occurred while pre-loading the native DLL 'sqlcecompact35.dll'
Error87.
sqlcecompact35.dll
Build:5692 Major:3 Minor:5
PBuild:5692 PMajor:3 PMinor:5
I also used opennetcf's smart device framework to look at the memory load as
I read that insufficient virtual memory would cause a dll to fail to load.
Available Physical Memory:114MB
Availabel Virtual Memory:1041MB
MemoryLoad:8
System Program Memory:121MB
SystemStorageMemory:121MB
Total Physical Memory:124MB
Total Virtual Memory:1048MB
I'm at my wits end and considering sending a jug of Maple syrup to the first
person that helps me figure this out......
.
Loading...