Error in data-bounding database to web form,(VS2010 Ultimate)(SQL CE).

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
hello all,
i am a beginner in making website, i learned things at msdn only, but now when i try to make a very simple Website, i am having this error
<span>
Unable to find the requested .Net Framework Data Provider. It may not be installed.
http://i.imgur.com/RV5qY.jpg<br/>

steps followed to creat ethe web site > New WebSite>Empty Website>Add new WebForm>Dragged The GridView on the page >Added new data source(sdf format).

The test query runs fine, but when i try to run it, i am having this error, i have spent the whole yesterday searching for a solution(but they seem to be valid no more, or are for older versions)
Here is the Web.config file :

<pre><configuration>
<connectionStrings>
<add name="ConnectionString" connectionString="Data Source=C:UsersTarunGDocumentsVisual Studio 2010WebSitesWebSite1App_DataDatabase1.sdf"
providerName="System.Data.SqlServerCe.Client.3.5" />
</connectionStrings>
<system.web>
<compilation debug="true" targetFramework="4.0 </compilation>
</system.web>
</configuration>[/code]


The default.aspx file :

<pre><body>
<form id="form1" runat="server



<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
DataKeyNames="Roll No." DataSourceID="SqlDataSource1
<Columns>
<asp:BoundField DataField="Roll No." HeaderText="Roll No." ReadOnly="True"
SortExpression="Roll No." />
<asp:BoundField DataField="Category" HeaderText="Category"
SortExpression="Category" />
<asp:BoundField DataField="Rank" HeaderText="Rank" SortExpression="Rank" />
<asp:BoundField DataField="Registration No." HeaderText="Registration No."
SortExpression="Registration No." />
<asp:BoundField DataField="Name" HeaderText="Name" SortExpression="Name" />
</Columns>
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>"
SelectCommand="SELECT * FROM [Result1] </asp:SqlDataSource>
</form>
</body>[/code]


------------------------------------------------------------------------
machine.config :
<pre><add name="SQL Server Compact Edition Data Provider" invariant="System.Data.SqlServerCe" description=".NET Framework Data Provider for Microsoft SQL Server Compact Edition" type="System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"/>

<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" />

<add name="Microsoft SQL Server Compact Data Provider" invariant="System.Data.SqlServerCe.3.5" description=".NET Framework Data Provider for Microsoft SQL Server Compact" type="System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe, Version=3.5.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"/>
<add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=6.3.6.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
<add name="Microsoft SQL Server Compact Data Provider" invariant="System.Data.SqlServerCe.3.5" description=".NET Framework Data Provider for Microsoft SQL Server Compact" type="System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe, Version=3.5.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"/>[/code]


Any Help will be greatly appreciated, I am completely exhausted searching the thing on my own.


View the full article
 
Back
Top