解决方案 »

  1.   

    你用dataset.table[0]的时候出错,应该是没有取到数据
      

  2.   

    这个项目是 我从服务器 拿下来的! 以前没发开过  .net  属于第一次  就被数据库 给拦住了下面附 web.config
    <?xml version="1.0" encoding="UTF-8"?><!-- 
        注意: 除了手动编辑此文件以外,您还可以使用 
        Web 管理工具来配置应用程序的设置。可以使用 Visual Studio 中的
         “网站”->“Asp.Net 配置”选项。
        设置和注释的完整列表在 
        machine.config.comments 中,该文件通常位于 
        \Windows\Microsoft.Net\Framework\v2.x\Config 中
    -->
    <configuration>
      <appSettings>
       
        <!--自己的本地连接-->
        <add key="dsn" value="Data Source=173A1001C5CF35DC3481078899E57536;      Initial Catalog=BBD8ADABA3E2450F87D88ADAC914E29A;  User ID=B7E32A57AE535F808660002FB4B06926;Password=AA3556F8673817C8DD2BD7DE88740EE48D659121D4A5BC4C" />
        <add key="aspnet:MaxHttpCollectionKeys" value="500000" />
      </appSettings>
      <system.web>
        <httpRuntime maxRequestLength="2097151" executionTimeout="3600" requestValidationMode="2.0" />
        <customErrors mode="Off" />
        <!-- 
                设置 compilation debug="true" 可将调试符号插入
                已编译的页面中。但由于这会 
                影响性能,因此只在开发过程中将此值 
                设置为 true。
            -->
        <!-- 测试-->
        <sessionState mode="InProc" timeout="40" />
        <!--<sessionState
          mode="InProc"
          cookieless="true"
          timeout="30" />-->
        <!-- 正式-->
        <!--<sessionState mode="StateServer" stateConnectionString="tcpip=127.0.0.1:42424" cookieless="false" timeout="120"/>
        -->
        <compilation debug="true" targetFramework="4.0">
          <assemblies>
            <add assembly="System.Speech, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
          </assemblies>
        </compilation>
        <!--
                通过 <authentication> 节可以配置 ASP.NET 用来 
                识别进入用户的
                安全身份验证模式。 
            -->
        <authentication mode="Windows" />
        <!--
                如果在执行请求的过程中出现未处理的错误,
                则通过 <customErrors> 节可以配置相应的处理步骤。具体说来,
                开发人员通过该节可以配置
                要显示的 html 错误页
                以代替错误堆栈跟踪。        <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
                <error statusCode="403" redirect="NoAccess.htm" />
                <error statusCode="404" redirect="FileNotFound.htm" />
            </customErrors>
            -->
        <!--<customErrors mode="RemoteOnly" defaultRedirect="Admin.aspx"/>-->
        <httpHandlers>
          <add verb="GET" path="FtbWebResource.axd" type="FreeTextBoxControls.AssemblyResourceHandler, FreeTextBox" validate="false" />
        </httpHandlers>
        <pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID" />
        
      </system.web>
      <!-- 
            在 Internet 信息服务 7.0 下运行 ASP.NET AJAX 需要 system.webServer
            节。对早期版本的 IIS 来说则不需要此节。
        -->
      
      
      <system.webServer>
        <validation validateIntegratedModeConfiguration="false" />
            <defaultDocument>
                <files>
                    <add value="orderindex.aspx" />
                    <add value="Index.aspx" />
                </files>
            </defaultDocument>
      </system.webServer>
    </configuration>求教育! 
      

  3.   

    这未必是数据库的连接错误,报错是因为数据集dataset为null,可能是sql语句写错了,没代码也只能猜测
      

  4.   

    从数据返回的数据集为空,开启debug模式或者记录详细log
      

  5.   


    检查这两个函数,看看是你那个Table从那里来。一路往回找