btkrieger
asked on
Can you use a text file as a data source for a GridView in ASP
Hello,
I have a working ASP page that is pulling data from a SQL table into a Gridview with a select statement. I would like to do the same thing using a text file vs the SQL table as my data source. Is this possible to create a system DSN and connect to the text file to pull my data? If not can you point me into the right direction?
Current Web.cofig
<connectionStrings>
<add name="FBConnectionString" connectionString="Data Source=FORTISBLUE2008\SQLE XPRESS;Ini tial Catalog=YourLookup;User ID=blue;Password=blue;Conn ect Timeout=200" providerName="System.Data. SqlClient" /> --%>
</connectionStrings>
Current asp page:
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:FBConnec tionString %>" SelectCommand="SELECT * FROM dbo.APInvoice WHERE VendorName LIKE @VName">
<SelectParameters>
<asp:ControlParameter ControlID="tbVName" Name="VName" PropertyName="Text" />
</SelectParameters>
I have a working ASP page that is pulling data from a SQL table into a Gridview with a select statement. I would like to do the same thing using a text file vs the SQL table as my data source. Is this possible to create a system DSN and connect to the text file to pull my data? If not can you point me into the right direction?
Current Web.cofig
<connectionStrings>
<add name="FBConnectionString" connectionString="Data Source=FORTISBLUE2008\SQLE
</connectionStrings>
Current asp page:
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:FBConnec
<SelectParameters>
<asp:ControlParameter ControlID="tbVName" Name="VName" PropertyName="Text" />
</SelectParameters>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Open in new window