Discussion:
Sql SP1: Failed to initialize the provider
(too old to reply)
Cloud Strife
2008-10-20 10:04:06 UTC
Permalink
Hi guys,
I downloaded Microsoft SQL Server 3.5 Compact Edition SP1 from
Microsoft's web site and now I am trying to install it on a Compulab
CM-X270 module running Windows CE 6.0.

I copied to the device and launched the installation of following CABs:
- sqlce.wce5.armv4i.CAB
- sqlce.repl.wce5.armv4i.CAB
- sqlce.dev.ENU.wce5.armv4i.CAB

The installation completed fine (no errors) and I found in Start menu
the new entry "Query Analyzer 3".

Now I would like to create a new database (.sdf), so I launch "Query
Analyzer 3", I click on the first icon in the toolbar in order to create
a new DB on "\NAND_Flash\test.sdf". I leave blank the password field and
I select "General" in "Sort" combobox. When I click on "Create" it gives
me this error: "ISQLW Error Failed to initialize the provider. Please
make sure that SQL Server Compact is properly installed."

What's wrong? There are some other components I need to install?

Other posts in this newsgroup suggested me to not install
"sqlce.repl.wce5.armv4i.CAB"; ok, I tried this way too, but the problem
is still there.

Any ideas?

Thanks
Laxmi Narsimha Rao Oruganti
2008-10-20 14:49:18 UTC
Permalink
Actually if you need to use ISQLW, you need to have repl cab also installed
as REPL Cab contains the OLEDB Provider and ISQLW is written as an OLEDB
Application.

Few questions to nail down the problem:
1) Do you have enough memory to load all the DLLs?
2) Did you install CAB on main memory or on storage card? If so, does
installing on the other media works?
3) What if you try to create DB on the main memory than on storage card.

I am not suggesting that SQL CE can not create a DB on storage card. I am
just trying to narrow down the problem then we can analyze.

Thanks,
Laxmi
Post by Cloud Strife
Hi guys,
I downloaded Microsoft SQL Server 3.5 Compact Edition SP1 from Microsoft's
web site and now I am trying to install it on a Compulab CM-X270 module
running Windows CE 6.0.
- sqlce.wce5.armv4i.CAB
- sqlce.repl.wce5.armv4i.CAB
- sqlce.dev.ENU.wce5.armv4i.CAB
The installation completed fine (no errors) and I found in Start menu the
new entry "Query Analyzer 3".
Now I would like to create a new database (.sdf), so I launch "Query
Analyzer 3", I click on the first icon in the toolbar in order to create a
new DB on "\NAND_Flash\test.sdf". I leave blank the password field and I
select "General" in "Sort" combobox. When I click on "Create" it gives me
this error: "ISQLW Error Failed to initialize the provider. Please make
sure that SQL Server Compact is properly installed."
What's wrong? There are some other components I need to install?
Other posts in this newsgroup suggested me to not install
"sqlce.repl.wce5.armv4i.CAB"; ok, I tried this way too, but the problem is
still there.
Any ideas?
Thanks
Cloud Strife
2008-10-20 15:47:54 UTC
Permalink
Post by Laxmi Narsimha Rao Oruganti
Actually if you need to use ISQLW, you need to have repl cab also installed
as REPL Cab contains the OLEDB Provider and ISQLW is written as an OLEDB
Application.
1) Do you have enough memory to load all the DLLs?
2) Did you install CAB on main memory or on storage card? If so, does
installing on the other media works?
3) What if you try to create DB on the main memory than on storage card.
I am not suggesting that SQL CE can not create a DB on storage card. I am
just trying to narrow down the problem then we can analyze.
Thanks,
Laxmi
Hi Laxmi,
thank you for your support.

Here are the answers to your questions:
1) I have about 20 MB or free RAM, so I think it is enough;
2) I tried installing CABs both on main memory and on storage card, with
no luck;
3) I tried to create the DB both on main memory and on storage card: it
ends up with the same error.

There something else I can try?

Regards
Laxmi Narsimha Rao Oruganti
2008-10-20 15:56:40 UTC
Permalink
Can you try to check if OLEDB provider is actually registered by co-creating
an instance if possible?
Post by Cloud Strife
Post by Laxmi Narsimha Rao Oruganti
Actually if you need to use ISQLW, you need to have repl cab also
installed as REPL Cab contains the OLEDB Provider and ISQLW is written as
an OLEDB Application.
1) Do you have enough memory to load all the DLLs?
2) Did you install CAB on main memory or on storage card? If so, does
installing on the other media works?
3) What if you try to create DB on the main memory than on storage card.
I am not suggesting that SQL CE can not create a DB on storage card. I
am just trying to narrow down the problem then we can analyze.
Thanks,
Laxmi
Hi Laxmi,
thank you for your support.
1) I have about 20 MB or free RAM, so I think it is enough;
2) I tried installing CABs both on main memory and on storage card, with
no luck;
3) I tried to create the DB both on main memory and on storage card: it
ends up with the same error.
There something else I can try?
Regards
Cloud Strife
2008-10-21 06:41:45 UTC
Permalink
Post by Laxmi Narsimha Rao Oruganti
Can you try to check if OLEDB provider is actually registered by co-creating
an instance if possible?
Hi Laxmi,
can you help me with the code?

Thanks
Laxmi Narsimha Rao Oruganti
2008-10-23 02:11:03 UTC
Permalink
Just call WIN32 API CoCreateInstance with CLSID_SQLSERVERCE and you need to
include sqlce_oledb.h. and see if you have really got the class instance
back and also validate HRESULT.

Thanks,
Laxmi
Post by Cloud Strife
Post by Laxmi Narsimha Rao Oruganti
Can you try to check if OLEDB provider is actually registered by
co-creating an instance if possible?
Hi Laxmi,
can you help me with the code?
Thanks
Cloud Strife
2008-10-23 07:54:24 UTC
Permalink
Post by Laxmi Narsimha Rao Oruganti
Just call WIN32 API CoCreateInstance with CLSID_SQLSERVERCE and you need to
include sqlce_oledb.h. and see if you have really got the class instance
back and also validate HRESULT.
Thanks,
Laxmi
Hi Laxmi,
thank you very much for your help

here is the code I used for testing:

// ----------------------------------------------------
CoInitializeEx(NULL, COINIT_MULTITHREADED);
CoCreateInstance(CLSID_SQLSERVERCE, NULL, CLSCTX_INPROC_SERVER,
IID_IUnknown, (void **)&pDSO);
// ----------------------------------------------------

The call to CoInitializeEx returns with S_OK, while the second one
returns with "0x80040154 (not registered interface)".

And now? There's a way to fix this problem?

Thanks
Laxmi Narsimha Rao Oruganti
2008-10-23 17:48:22 UTC
Permalink
1) Now we know that our OLEDB provider is ont registered
2) Can you hard reset (not soft reset) device and do a fresh install?
Please be aware of what you lose with hard reset
3) Check you have sqlceoldb35.dll installed under \Program Files\Microsoft
SQL Server Compact Edition\v3.5\
4) Try to register this DLL using CE version of regsvr32 OR try to create
those registry keys yourself. I know this sounds like stupid solution, but
I just dont have an idea why a CAB installation succeeds where as "Register
DLL" action as part of CAB Setup is ignored.
5) It may be that sqlceoldb35.dll failed to load when CAB called register
action on this COM DLL. Why a DLL can fail to load could be because the
image might not have OLE related DLLs.
Please see this blog article.:
http://blogs.msdn.com/sqlservercompact/archive/2007/10/26/troubleshooting-can-t-load-sqlce-dll.aspx

Let me know your findings

Thanks,
Laxmi
Post by Cloud Strife
Post by Laxmi Narsimha Rao Oruganti
Just call WIN32 API CoCreateInstance with CLSID_SQLSERVERCE and you need
to include sqlce_oledb.h. and see if you have really got the class
instance back and also validate HRESULT.
Thanks,
Laxmi
Hi Laxmi,
thank you very much for your help
// ----------------------------------------------------
CoInitializeEx(NULL, COINIT_MULTITHREADED);
CoCreateInstance(CLSID_SQLSERVERCE, NULL, CLSCTX_INPROC_SERVER,
IID_IUnknown, (void **)&pDSO);
// ----------------------------------------------------
The call to CoInitializeEx returns with S_OK, while the second one returns
with "0x80040154 (not registered interface)".
And now? There's a way to fix this problem?
Thanks
Cloud Strife
2008-10-25 06:20:46 UTC
Permalink
Post by Laxmi Narsimha Rao Oruganti
1) Now we know that our OLEDB provider is ont registered
2) Can you hard reset (not soft reset) device and do a fresh install?
Please be aware of what you lose with hard reset
3) Check you have sqlceoldb35.dll installed under \Program Files\Microsoft
SQL Server Compact Edition\v3.5\
4) Try to register this DLL using CE version of regsvr32 OR try to create
those registry keys yourself. I know this sounds like stupid solution, but
I just dont have an idea why a CAB installation succeeds where as "Register
DLL" action as part of CAB Setup is ignored.
5) It may be that sqlceoldb35.dll failed to load when CAB called register
action on this COM DLL. Why a DLL can fail to load could be because the
image might not have OLE related DLLs.
http://blogs.msdn.com/sqlservercompact/archive/2007/10/26/troubleshooting-can-t-load-sqlce-dll.aspx
Let me know your findings
Thanks,
Laxmi
Hi Laxmi,
ok, I've tried your way and performed a fresh install.

Then I wanted to manually register the sqlceoledb35.dll (using gbregsrv,
a regsvr32 clone for Windows CE found on the wed) but it gives me an
error (Error 193).

I checked DLL dependecies and on my Windows CE I have both ole32.dll and
oleauto32.dll. Furthermore I also have >16MB of free memory (it should
be enough, right?).

Do you have some other ideas?

Thanks,
Laxmi Narsimha Rao Oruganti [MSFT]
2008-10-27 08:05:25 UTC
Permalink
Did you try your test program of co-creating SQL CE OLEDB CLSID and it fails
even now?

If it fails even with fresh intall, then can you let us know the contents of
the following registry hives (including subkeys and values):
1) HKLM\Software\Microsoft\Microsoft SQL Server Compact Edition\v3.5
2) HKCU\CLSID\{F49C559D-E9E5-467C-8C18-3326AAE4EBCC}

Thanks,
Laxmi
Post by Cloud Strife
Post by Laxmi Narsimha Rao Oruganti
1) Now we know that our OLEDB provider is ont registered
2) Can you hard reset (not soft reset) device and do a fresh install?
Please be aware of what you lose with hard reset
3) Check you have sqlceoldb35.dll installed under \Program
Files\Microsoft SQL Server Compact Edition\v3.5\
4) Try to register this DLL using CE version of regsvr32 OR try to create
those registry keys yourself. I know this sounds like stupid solution,
but I just dont have an idea why a CAB installation succeeds where as
"Register DLL" action as part of CAB Setup is ignored.
5) It may be that sqlceoldb35.dll failed to load when CAB called register
action on this COM DLL. Why a DLL can fail to load could be because the
image might not have OLE related DLLs.
http://blogs.msdn.com/sqlservercompact/archive/2007/10/26/troubleshooting-can-t-load-sqlce-dll.aspx
Let me know your findings
Thanks,
Laxmi
Hi Laxmi,
ok, I've tried your way and performed a fresh install.
Then I wanted to manually register the sqlceoledb35.dll (using gbregsrv, a
regsvr32 clone for Windows CE found on the wed) but it gives me an error
(Error 193).
I checked DLL dependecies and on my Windows CE I have both ole32.dll and
oleauto32.dll. Furthermore I also have >16MB of free memory (it should be
enough, right?).
Do you have some other ideas?
Thanks,
Cloud Strife
2008-10-27 09:16:17 UTC
Permalink
Post by Laxmi Narsimha Rao Oruganti [MSFT]
Did you try your test program of co-creating SQL CE OLEDB CLSID and it fails
even now?
If it fails even with fresh intall, then can you let us know the contents of
1) HKLM\Software\Microsoft\Microsoft SQL Server Compact Edition\v3.5
2) HKCU\CLSID\{F49C559D-E9E5-467C-8C18-3326AAE4EBCC}
Thanks,
Laxmi
Hi Laxmi,
you're right: even after a fresh install I cannot co-create SQL CE OLEDB
interface.

Here's what I have in the registry under
HKLM\Software\Microsoft\Microsoft SQL Server Compact Edition\v3.5:

-----
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server Compact Edition]

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server Compact
Edition\v3.5]
"NativeDir"="\\NAND_Flash\\Microsoft SQL Server Compact Edition\\v3.5"
"InstallDir"="\\NAND_Flash\\Microsoft SQL Server Compact Edition\\v3.5"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server Compact
Edition\v3.5\ISQLW]

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server Compact
Edition\v3.5\ISQLW\Font]
"FontSize"=dword:0000000a
"FontName"="Verdana"
-----


Furthermore: under HKCU (HKEY_CURRENT_USER) I cannot find subkey CLSID;
I find it under HKEY_CLASSES_ROOT, but however subkey
"F49C559D-E9E5-467C-8C18-3326AAE4EBCC" does not exist!!!

Just be clarify my situation, here follows the listing of all files &
folders on my device flash disk (regarding Microsoft SQL Server CE
installation):


-----

Directory of \NAND_Flash\Microsoft SQL Server Compact Edition

08/01/60 01:39a <DIR> v3.5
08/01/60 01:42a <DIR> Tools
08/01/60 01:42a <DIR> Repl
08/01/60 01:44a <DIR> EN
01/01/00 12:13a 0 out.txt
12/21/06 06:33p 26112 dbnetlib.dll

Found 6 file(s). Total size 26112 bytes.

Directory of \NAND_Flash\Microsoft SQL Server Compact Edition\v3.5

10/01/07 11:49p 449328 sqlcese35.dll
10/01/07 11:49p 952624 sqlceqp35.dll
10/01/07 11:48p 63280 sqlceme35.dll

Found 3 file(s). Total size 1465232 bytes.

Directory of \NAND_Flash\Microsoft SQL Server Compact Edition\Tools

08/01/60 01:42a <DIR> v3.5

Found 1 file(s). Total size 0 bytes.

Directory of \NAND_Flash\Microsoft SQL Server Compact
Edition\Tools\v3.5

08/01/60 01:42a <DIR> EN
10/02/07 12:02a 144184 sqlceer35EN.dll
12/21/06 06:33p 26112 dbnetlib.dll

Found 3 file(s). Total size 170296 bytes.

Directory of \NAND_Flash\Microsoft SQL Server Compact
Edition\Tools\v3.5\EN

10/01/07 11:48p 144176 isqlw35.exe
12/21/06 06:33p 26112 dbnetlib.dll
10/02/07 12:02a 144184 sqlceer35EN.dll
10/01/07 11:49p 215344 sqlceoledb35.dll
10/01/07 11:48p 86320 sqlcecompact35.dll
10/01/07 11:49p 479024 sqlceca35.dll
10/01/07 11:49p 449328 sqlcese35.dll
10/01/07 11:49p 952624 sqlceqp35.dll
10/01/07 11:48p 63280 sqlceme35.dll

Found 9 file(s). Total size 2560392 bytes.

Directory of \NAND_Flash\Microsoft SQL Server Compact Edition\Repl

08/01/60 01:42a <DIR> v3.5

Found 1 file(s). Total size 0 bytes.

Directory of \NAND_Flash\Microsoft SQL Server Compact Edition\Repl\v3.5

10/01/07 11:49p 479024 sqlceca35.dll
10/01/07 11:49p 215344 sqlceoledb35.dll
10/01/07 11:48p 86320 sqlcecompact35.dll

Found 3 file(s). Total size 780688 bytes.

Total Files Listed:
26 File(s) 5002720 bytes.
7 Dir(s) 59803136 bytes free


-----


Thanks again for the collaboration. I look forward for receiving news
from you soon.
Laxmi Narsimha Rao Oruganti
2008-10-27 12:34:10 UTC
Permalink
I am sorry that I told HKCU. Yes, you are right it is HKCR.

Some how, I don't believe the fact that DLLs are installed multiple places
and there multiple copies of them. Also, I am not sure why the
installations are so hairy in the directory structure. This is what it
should look like:

ROOT: .<Storage Root>\Microsoft SQL Server Compact Edition\v3.5

ROOT should have: sqlcese35.dll, sqlceqp35.dll, sqlceme35.dll,
sqlceca35.dll, sqlceoledb35.dll, sqlcecompact35.dll, sqlceer35en.dll,
isqlw35.exe

In a sense, all DLLs should get copied into same folder and I see it being
not the case in your device.

If I am not wrong, you said things did not work on main memory installation
too. How was the installation directory in that case? I see that there is
an issue with NAND Flash and Setup integration. Can you let me know the
story if you just get rid of flash card for a while (just for testing) and
do your troubleshooting on main memory.

Thanks,
Laxmi
Post by Cloud Strife
Post by Laxmi Narsimha Rao Oruganti [MSFT]
Did you try your test program of co-creating SQL CE OLEDB CLSID and it
fails even now?
If it fails even with fresh intall, then can you let us know the contents
1) HKLM\Software\Microsoft\Microsoft SQL Server Compact Edition\v3.5
2) HKCU\CLSID\{F49C559D-E9E5-467C-8C18-3326AAE4EBCC}
Thanks,
Laxmi
Hi Laxmi,
you're right: even after a fresh install I cannot co-create SQL CE OLEDB
interface.
Here's what I have in the registry under HKLM\Software\Microsoft\Microsoft
-----
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server Compact Edition]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server Compact
Edition\v3.5]
"NativeDir"="\\NAND_Flash\\Microsoft SQL Server Compact Edition\\v3.5"
"InstallDir"="\\NAND_Flash\\Microsoft SQL Server Compact Edition\\v3.5"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server Compact
Edition\v3.5\ISQLW]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server Compact
Edition\v3.5\ISQLW\Font]
"FontSize"=dword:0000000a
"FontName"="Verdana"
-----
Furthermore: under HKCU (HKEY_CURRENT_USER) I cannot find subkey CLSID; I
find it under HKEY_CLASSES_ROOT, but however subkey
"F49C559D-E9E5-467C-8C18-3326AAE4EBCC" does not exist!!!
Just be clarify my situation, here follows the listing of all files &
folders on my device flash disk (regarding Microsoft SQL Server CE
-----
Directory of \NAND_Flash\Microsoft SQL Server Compact Edition
08/01/60 01:39a <DIR> v3.5
08/01/60 01:42a <DIR> Tools
08/01/60 01:42a <DIR> Repl
08/01/60 01:44a <DIR> EN
01/01/00 12:13a 0 out.txt
12/21/06 06:33p 26112 dbnetlib.dll
Found 6 file(s). Total size 26112 bytes.
Directory of \NAND_Flash\Microsoft SQL Server Compact Edition\v3.5
10/01/07 11:49p 449328 sqlcese35.dll
10/01/07 11:49p 952624 sqlceqp35.dll
10/01/07 11:48p 63280 sqlceme35.dll
Found 3 file(s). Total size 1465232 bytes.
Directory of \NAND_Flash\Microsoft SQL Server Compact Edition\Tools
08/01/60 01:42a <DIR> v3.5
Found 1 file(s). Total size 0 bytes.
Directory of \NAND_Flash\Microsoft SQL Server Compact
Edition\Tools\v3.5
08/01/60 01:42a <DIR> EN
10/02/07 12:02a 144184 sqlceer35EN.dll
12/21/06 06:33p 26112 dbnetlib.dll
Found 3 file(s). Total size 170296 bytes.
Directory of \NAND_Flash\Microsoft SQL Server Compact
Edition\Tools\v3.5\EN
10/01/07 11:48p 144176 isqlw35.exe
12/21/06 06:33p 26112 dbnetlib.dll
10/02/07 12:02a 144184 sqlceer35EN.dll
10/01/07 11:49p 215344 sqlceoledb35.dll
10/01/07 11:48p 86320 sqlcecompact35.dll
10/01/07 11:49p 479024 sqlceca35.dll
10/01/07 11:49p 449328 sqlcese35.dll
10/01/07 11:49p 952624 sqlceqp35.dll
10/01/07 11:48p 63280 sqlceme35.dll
Found 9 file(s). Total size 2560392 bytes.
Directory of \NAND_Flash\Microsoft SQL Server Compact Edition\Repl
08/01/60 01:42a <DIR> v3.5
Found 1 file(s). Total size 0 bytes.
Directory of \NAND_Flash\Microsoft SQL Server Compact
Edition\Repl\v3.5
10/01/07 11:49p 479024 sqlceca35.dll
10/01/07 11:49p 215344 sqlceoledb35.dll
10/01/07 11:48p 86320 sqlcecompact35.dll
Found 3 file(s). Total size 780688 bytes.
26 File(s) 5002720 bytes.
7 Dir(s) 59803136 bytes free
-----
Thanks again for the collaboration. I look forward for receiving news from
you soon.
Kane Conway
2008-11-18 15:45:37 UTC
Permalink
Hey Guys,

I had the same error when i tried to create a database in SQL Server
Compact edition. I tried what was said earlier ie,
copy "sqlceoledb35.dll" to the directory "\Storage Card\Program
Files\Microsoft SQL Server Compact Edition\v3.5\"
Download 2 files, WM5_regsvrce.exe and rescoexplorer Trail
install rescoexplorer
copy WM5_regsvrce to the mobile
run rescoexplorer
menu
file >> run
select the file WM5_regsvrce
in the arguments, type the path till v3.5
like "\Storage Card\Program Files\Microsoft SQL Server Compact
Edition\v3.5\sqlceoledb35.dll"
run it, it should give a message with successful
run query analyzer 3 and you should be able to create your database
hope this helps
*** Sent via Developersdex http://www.developersdex.com ***

Loading...