Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cursors?
Message
 
 
À
04/10/2011 17:24:11
Information générale
Forum:
ASP.NET
Catégorie:
Bases de données
Titre:
Divers
Thread ID:
01522833
Message ID:
01525583
Vues:
57
This message has been marked as the solution to the initial question of the thread.
>>
>>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
Add a call to GridView1.DataBind() as last line.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform