title: ASP .NET C# - Put round SqlDataSource into square DataTable hole?
body: <p>Using the <a href="http://www.codeproject.com/KB/graphics/giospdfnetlibrary.aspx" rel="nofollow noreferrer" title="GiosPDF Library">GiosPDF Library</a> in a ASP .NET 3.5 web application.  The library examples use a datatable to populate a PDF table.  All my data is in various SQLDataSources.  How do I convert/cast the SqlDataSource into a Datatable?</p>
  
  <p>I tried this:</p>
  
  <pre><code> DataView sdsLateRoutesDV = new DataView();
   DataTable sdsLateRoutesDT = new DataTable();
   sdsLateRoutesDV = (DataView)sdsLateRoutes_long.Select(DataSourceSelectArguments.Empty);
   sdsLateRoutesDT = sdsLateRoutesDV.ToTable();
  </code></pre>
  
  <p>But it crashes...</p>