Thursday, March 29, 2012

Default Mobile Database Application

Dear All,

I am trying to build a simple mobile application. I am very new to this. Thus I am trying to access the build in database in the folder C:\Program Files\Microsoft SQL Server 2005 Mobile Edition\Device\Mobile\v3.0\Northwind.sdf. I am following the steps in the wizard to help me. When I press test connection is say Test Connection Succeeded. But when I press the ok button I get this error as "Unable to find the requested .Net Framework Data Provider. It may not be installed". I am running VS 2005. Can anyone pls help ?

This is a problem with the installation of VS2005 on your development PC. I've seen this same problem a few times. It is usually caused by a remnant of one of the beta or release candidate versions of VS2005 not being completely cleaned up on the development machine. I would follow the instructions in the VS2005 release notes to completely clean your machine and then do a fresh install of VS2005.

-Darren

|||

If you have uninstalled and reinstalled .NET Fx after VS Installation, this problem would arise. Can you please search for Data Providers in .NET Framework config file.

%SystemDrive%\WINDOWS\Microsoft.NET\Framework\v2.0.xxxxx\config\machine.config

Open this file in NOTEPAD, and search for "SQL Server CE Data Provider". If it is not there then, you may try adding the following line AS IT IS in Data Providers section.

<add name="SQL Server CE Data Provider" invariant="Microsoft.SqlServerCe.Client" description=".NET Framework Data Provider for Microsoft SQL Server 2005 Mobile Edition" type="Microsoft.SqlServerCe.Client.SqlCeClientFactory, Microsoft.SqlServerCe.Client, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />

You may need to restart the VS or even the PC to make VS detect this new setting.

Let us know if this has worked for you!

Thanks,
Laxmi Narsimha Rao ORUGANTI, MSFT, SQL Mobile, Microsoft Corporation

|||

Dear Laxmi,

I am very thankful for your answer but I dont get what do you meant by .NET FX? This is because I get very confuse when I go to the microsoft webpage for download. I am confuse with .NET Framework SDK and .Net Framework Version 2.0 Resistributable what is the different between both of them ? What is also the different between the x86 and x64 ?. Another thing is about the .NET Compact ? About this .NET Compact must I install in my pda or smartphone in order for my smart applications to work is it ? Sorry I am very new to this technology and also very much confused and mixed up. Thanks very much for your kind reply.

|||

I am really sorry about that in using the jargons. Ok. .NET FX means .NET Framework v2.0 Redistributable. The .NET FX SDK is nothing but extra development tools over .NET FX for users. x86 is Intel processor architecture - it represents 8086 series of processors such as i386, i486 .... Where as x64 means 64-bit processors. And the answer to your last question is, YES you have to install .NET Compact Framework 2.0 on the device (smartphone or pda or pocket pc) in order for you to make use of SQL Mobile 3.0 product with ADO.NET provider.

Thanks

Laxmi Narsimha Rao ORUGANTI, MSFT, SQL Mobile, Microsoft Corporation

|||Excellent information. I had this exact problem and after a few days of searching finally found your answer. It has fixed my problem. Are there any more tweaks I might have to make due to having had previous versions of tools installed ?
I have already discovered the fix to problems with connecting to device emulators where registry keys have to be removed.

|||

I have opened the file as you have recommended, but I don't see a "Data Providers" section except for the following..

<configProtectedData defaultProvider="RsaProtectedConfigurationProvider">
<providers>

...

Another section:

<system.data>
<DbProviderFactories>
<add name="Odbc Data Provider" invariant="System.Data.Odbc" description=".Net Framework Data Provider for Odbc" type="System.Data.Odbc.OdbcFactory, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
<add name="OleDb Data Provider" invariant="System.Data.OleDb" description=".Net Framework Data Provider for OleDb" type="System.Data.OleDb.OleDbFactory, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
<add name="OracleClient Data Provider" invariant="System.Data.OracleClient" description=".Net Framework Data Provider for Oracle" type="System.Data.OracleClient.OracleClientFactory, System.Data.OracleClient, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
<add name="SqlClient Data Provider" invariant="System.Data.SqlClient" description=".Net Framework Data Provider for SqlServer" type="System.Data.SqlClient.SqlClientFactory, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
</DbProviderFactories>
</system.data>

So I am thinking hte system.data...

Is that the rigth location?

|||That worked for me - wondefull|||Hey, can you please, please help me?
I have exactly the same problem as described above;
unfortunately adding the line to the machine.config file doesn't work for me...
I restarted the VS and the whole PC, but it still doesn't work;
I don't have Data Providers section so I added that line to providers section, maybe it's the wrong place?
I will appreciate your help very much!
|||Ok, never mind.. I found out what was the problem - I not only had to add the given entry, but also I had to comment out some already existing entries :-)
Now everything works fine! (so far anyway :-P)
|||I have a similar problem. I am able to work fine in my development environment, however when I deploy the application to a clean machine, I get the dreaded "Unable to find the requested .Net Framework Data Provider" error.

I have included the eight dlls required by the Sql Server 2005 CE engine (per the documentation) in the deployment project.

Any help would be greatly appreciated.
sql

No comments:

Post a Comment