Hej!
Jag får detta felmeddelande:
"Unable to find the requested .Net Framework Data Provider. It may not be installed."
Här kommer min kod:
<%@ Page Language="VB" %>
<%@ Import Namespace="MySql.Data.MySqlClient" %>
<%@ import namespace="system.data.oledb" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="sv" lang="sv">
<head>
<title>test</title>
</head>
<body>
<form id="form1" runat="server">
<asp:SqlDataSource
ID="MySqlDataSource"
runat="server"
ConnectionString="<%$ ConnectionStrings:MyConnectionString %>"
ProviderName="MySql.Data.MySQLClient"
SelectCommand="SELECT * FROM tblPriser ORDER BY Nummer ASC">
</asp:SqlDataSource>
<asp:GridView ID="gvPriser" runat="server" AutoGenerateColumns="False" DataSourceID="MySqlDataSource" DataKeyNames="Nummer"
AllowPaging="True" PageSize="5" AllowSorting="True"
EnableSortingAndPagingCallbacks="True" >
<Columns>
<asp:BoundField ReadOnly="True" HeaderText="Nummer"
InsertVisible="False" DataField="Nummer"
SortExpression="Nummer"></asp:BoundField>
<asp:BoundField ReadOnly="True" HeaderText="Klubb"
InsertVisible="False" DataField="Klubb"
SortExpression="Klubb"></asp:BoundField>
</Columns>
</asp:GridView>
</form>
</body>
</html>
och web.config:
<?xml version="1.0"?>
<configuration>
<connectionStrings>
<add name="MyConnectionString" connectionString="server=server; uid=a; pwd=b; database=c;" providerName="MySql.Data.MySqlClient"/>
</connectionStrings>
<system.web>
<customErrors mode="Off"/>
<compilation debug="true" />
</system.web>
</configuration>
Jag har laddat ner MySQL driver och lagt den i /bin enligt vad som sägs här: (http://www.web10.se/help/faq/windows_mysql_net)
tar tacksamt emot idéer!