Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cursors?
Message
From
04/10/2011 17:24:11
 
General information
Forum:
ASP.NET
Category:
Databases
Title:
Miscellaneous
Thread ID:
01522833
Message ID:
01525582
Views:
27
>
>Instead of oReader.Read() can you get the number of records? Also, I forgot a little how we assign result of the reader to GridView. It is not easy, as I recall. If you would fill a DataSet, it will be a different story.

There are over 4K records returned. How would you do it with a dataset? This doesn't work either.
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

		Dim SQL As String
		SQL = "SELECT * INTO #TempConstraint FROM [ApprovedFunding]"
		Dim oConn As New SqlConnection(ConfigurationManager.ConnectionStrings("TIPConnectionString").ConnectionString)
		Dim oCommand As New SqlCommand(SQL, oConn)

		oConn.Open()
		oCommand.ExecuteNonQuery()
		oCommand.CommandText = "SELECT * FROM #TempConstraint"

		Dim oDataAdapter As New SqlDataAdapter
		Dim ds As New DataSet

		oDataAdapter.SelectCommand = oCommand
		oDataAdapter.Fill(ds)
		GridView1.DataSource = ds

	End Sub
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform