DataSet

mercoledì 01 ottobre 2003 - 10.13

050782 Profilo | Junior Member

Dim iCount As Integer = 0
Dim da As New SqlClient.SqlDataAdapter("select...", objConnection)
Dim ds As New DataSet
da.Fill(dsIscritti)

For iCount = 0 To ds.Tables(0).Rows.Count - 1
'qui dovrei leggere il contenuto del dataset!
Next


Come faccio a leggere i valori inseriti nel dataset???

Admin Profilo | Junior Member

essendo una collection di DataRow, puoi anche, oltre a quanto suggeritoti da Coach, enumerare le row, con una for each

Dim dr as dataRow
dim myValue as string

For Each dr in ds.Tables(0).Rows
myValue = dr("nomecolonna")
Next

Ciao

Stefano Giannone [MCP .NET]
Partecipa anche tu! Registrati!
Hai bisogno di aiuto ?
Perchè non ti registri subito?

Dopo esserti registrato potrai chiedere
aiuto sul nostro Forum oppure aiutare gli altri

Consulta le Stanze disponibili.

Registrati ora !
Copyright © dotNetHell.it 2002-2024
Running on Windows Server 2008 R2 Standard, SQL Server 2012 & ASP.NET 3.5