A
Adam Sandler
Hello all,
I'm trying to use VWD 2005 Express Edition to connect to a database.
For my initial prototyping though, I'm just using an Excel
spreadsheet as the source and everything resides on the local host.
All I want to do right now is get the info from the source and display
it on a webpage.
I've dropped a GridView and a SQLDataSource onto the page and
here's the code:
<form id="form1" runat="server">
<div>
<!-- added 5-8-06 -->
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="Driver={Microsoft Excel Driver
(*.xls)};DriverId=790;Dbq=C:\Web\test.xls;DefaultDir=C:\Web;"
SelectCommand="SELECT * FROM [sheet1$]">
</asp:SqlDataSource>
<asp:GridView ID="GridView1" runat="server"
DataSourceID="SqlDataSource1">
</asp:GridView>
</div>
</form>
I've looked at old posts in this group, KB article 311731, and places
like connectionstrings.com. However when I run the app, this error is
thrown:
Server Error in '/WebSite1' Application.
--------------------------------------------------------------------------------
Keyword not supported: 'driver'.
Description: An unhandled exception occurred during the execution
of the current web request. Please review the stack trace for more
information about the error and where it originated in the code.
Exception Details: System.ArgumentException: Keyword not supported:
'driver'.
Source Error:
An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of
the exception can be identified using the exception stack trace below.
I'm absolutely perplexed by this error... the description says the
keyword "driver" is not supported. Everything I've read shows the
connection string as I tried using it above. I've even copied and
pasted it (only editing the path to the Excel file) from the KB article
and I still get this error. Any suggestions are greatly appreciated.
Thanks!
I'm trying to use VWD 2005 Express Edition to connect to a database.
For my initial prototyping though, I'm just using an Excel
spreadsheet as the source and everything resides on the local host.
All I want to do right now is get the info from the source and display
it on a webpage.
I've dropped a GridView and a SQLDataSource onto the page and
here's the code:
<form id="form1" runat="server">
<div>
<!-- added 5-8-06 -->
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="Driver={Microsoft Excel Driver
(*.xls)};DriverId=790;Dbq=C:\Web\test.xls;DefaultDir=C:\Web;"
SelectCommand="SELECT * FROM [sheet1$]">
</asp:SqlDataSource>
<asp:GridView ID="GridView1" runat="server"
DataSourceID="SqlDataSource1">
</asp:GridView>
</div>
</form>
I've looked at old posts in this group, KB article 311731, and places
like connectionstrings.com. However when I run the app, this error is
thrown:
Server Error in '/WebSite1' Application.
--------------------------------------------------------------------------------
Keyword not supported: 'driver'.
Description: An unhandled exception occurred during the execution
of the current web request. Please review the stack trace for more
information about the error and where it originated in the code.
Exception Details: System.ArgumentException: Keyword not supported:
'driver'.
Source Error:
An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of
the exception can be identified using the exception stack trace below.
I'm absolutely perplexed by this error... the description says the
keyword "driver" is not supported. Everything I've read shows the
connection string as I tried using it above. I've even copied and
pasted it (only editing the path to the Excel file) from the KB article
and I still get this error. Any suggestions are greatly appreciated.
Thanks!