Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cursors?
Message
De
04/10/2011 17:40:22
 
 
Information générale
Forum:
ASP.NET
Catégorie:
Bases de données
Titre:
Divers
Thread ID:
01522833
Message ID:
01525584
Vues:
25
>>>
>>>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.

Got it!
Thanks
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform