Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
i'm trying to connect to an excel database ('mytable'). With this code, i get the error: "Keyword not supported: 'provider'". When i remove 'Provider =' from the connection string, i get the error: "Keyword not supported: 'microsoft.jet.oledb.4.0; data source'" This is the aspx file: <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %" SelectCommand="select * from [mytable]" </asp:SqlDataSource <asp:GridView ID="GridView1" runat="server" DataSourceID="SqlDataSource1"</asp:GridView the connectionstring in web.config: <add name="ConnectionString" connectionString="Provider= Microsoft.Jet.OLEDB.4.0; Data Source = c:\aspnet\ls4demotest\app_data\ls4demo.xls; Extended Properties=Excel 8.0;" providerName="System.Data.SqlClient" / Thanks for help Bart |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try this and modify the data source
"Provider=Microsoft.Jet.OLEDB.4.0;" & _ "Data Source=c:\foldername\workbookname.xls;" & _ "Extended Properties=""Excel 8.0;HDR=Yes""" "Bart" wrote: Hi, i'm trying to connect to an excel database ('mytable'). With this code, i get the error: "Keyword not supported: 'provider'". When i remove 'Provider =' from the connection string, i get the error: "Keyword not supported: 'microsoft.jet.oledb.4.0; data source'" This is the aspx file: <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %" SelectCommand="select * from [mytable]" </asp:SqlDataSource <asp:GridView ID="GridView1" runat="server" DataSourceID="SqlDataSource1"</asp:GridView the connectionstring in web.config: <add name="ConnectionString" connectionString="Provider= Microsoft.Jet.OLEDB.4.0; Data Source = c:\aspnet\ls4demotest\app_data\ls4demo.xls; Extended Properties=Excel 8.0;" providerName="System.Data.SqlClient" / Thanks for help Bart |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Problem connecting to Analysis Services | Excel Discussion (Misc queries) | |||
Problem with Pivot table Connecting to SQL 2005 OLAP | Excel Discussion (Misc queries) | |||
problem in connecting to winsql | Excel Discussion (Misc queries) | |||
Connecting to SQL from Excel | Excel Programming | |||
Connecting to excel datasheets using C# | Excel Programming |