Hey, I don't really understand database connection strings so I'm having problems debugging it. Any help not only figuring out the problem but also what is going on would be really appreciated:
I have a website on my localhost and I'm trying to get a sqldatasource to populate my gridview but it gives me the error 'Data source name not found and no default driver specified'.
My page says:
<asp:gridview id="AllOrdersChart" runat="server" Width="100%" DataSourceID="SqlDataSource1">
</asp:gridview>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:lollipopDB %>"
ProviderName = "System.Data.Odbc"
SelectCommand="SELECT * FROM LollipopsDB"></asp:SqlDataSource>
and my web.config says:
<connectionStrings>
<add name="lollipopDB" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\inetpub\wwwroot\Lollipops\App_Data\lollipopsDB.mdb;"
providerName="System.Data.OleDb" />
</connectionStrings>
Ideas on what is wrong?