locked
ERROR [HY024] [Microsoft][ODBC Text Driver] '(unknown)' is not a valid path RRS feed

  • Question

  • User1365335561 posted

    Hi Guys,

    I just recently installed Visual Studio 2012 and created an ASP.net  Web Application project to connect to a local csv file over ODBC.  It runs fine in  Visual STudio, but as soon as I publish it, I get the error "ERROR [HY024] [Microsoft][ODBC Text Driver] '(unknown)' is not a valid path".  Some pointers would be appreciated.

    Thanks 

    OS= Win7 Professional 32bit

    Software = Visual STudio 2012

     

     

    WebForm1.aspx

    <%@ Page Language="vb" AutoEventWireup="false" CodeBehind="WebForm1.aspx.vb" Inherits="WebApplication1.WebForm1" %>
    
    <%@ Register assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" namespace="System.Web.UI.DataVisualization.Charting" tagprefix="asp" %>
    
    <!DOCTYPE html>
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title></title>
    </head>
    <body style="height: 185px">
        <form id="form1" runat="server">
            <div style="height: 30px">Test<asp:Chart ID="Chart1" runat="server" DataSourceID="SqlDataSource1">
                <Series>
                    <asp:Series Name="Series1" XValueMember="Status" YValueMembers="Total">
                    </asp:Series>
                </Series>
                <ChartAreas>
                    <asp:ChartArea Name="ChartArea1">
                    </asp:ChartArea>
                </ChartAreas>
                </asp:Chart>
            </div>
            <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>" ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" SelectCommand="SELECT * FROM [report-88.csv]"></asp:SqlDataSource>
        </form>
    </body>
    </html>
    

     

    Web.config.  System dsn points to csv in "C:\Users\zgibson\Documents\Spice"

    <?xml version="1.0"?>
    <!--
      For more information on how to configure your ASP.NET application, please visit
      http://go.microsoft.com/fwlink/?LinkId=169433
      -->
    <configuration>
      <connectionStrings>
        <add name="ConnectionString" connectionString="Dsn=Tickets" providerName="System.Data.Odbc" />
      </connectionStrings>
      <appSettings>
        <add key="ChartImageHandler" value="storage=file;timeout=20;dir=c:\TempImageFiles\;" />
      </appSettings>
      <system.webServer>
        <validation validateIntegratedModeConfiguration="false" />
        <handlers>
          <remove name="ChartImageHandler" />
          <add name="ChartImageHandler" preCondition="integratedMode" verb="GET,HEAD,POST"
            path="ChartImg.axd" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
        </handlers>
      </system.webServer>
      <system.web>
        <httpHandlers>
          <add path="ChartImg.axd" verb="GET,HEAD,POST" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
            validate="false" />
        </httpHandlers>
        <pages>
          <controls>
            <add tagPrefix="asp" namespace="System.Web.UI.DataVisualization.Charting"
              assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
          </controls>
        </pages>
        <compilation debug="true" strict="false" explicit="true" targetFramework="4.5">
          <assemblies>
            <add assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
          </assemblies>
        </compilation>
        <httpRuntime targetFramework="4.5"/>
      </system.web>
    </configuration>



    Monday, November 4, 2013 5:30 PM

All replies