2014年7月13日 星期日

[RESOLVED] SQL Data Source to Dataset


Hi, I have a SQL Data Source on my form that returns a single row of data. I would like to set each of the values from the one row returned form the data source to


variables so I can evaluate their values. Help/examples appreciated. Thanks. Using VB.net and asp.net in visual studio 2010 pro.



Sorry, update: I created a Data Table using my data source. How would I grab the values into variables? The Data source returns one row of about 10 columns. Current code:


Dim dv As New System.Data.DataView
Dim dt As New System.Data.DataTable
dv = dsProductDetails.Select(DataSourceSelectArguments.Empty)
dt = dv.ToTable()

Thanks!



Dim dt As DataTable = CType(dsProductDetails.Select(DataSourceSelectArguments.Empty), DataView).Table


沒有留言:

張貼留言