Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SqlDataSource and DataReaders
Message
De
25/05/2008 11:47:54
Timothy Bryan
Sharpline Consultants
Conroe, Texas, États-Unis
 
 
À
23/05/2008 17:54:29
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Divers
Thread ID:
01319299
Message ID:
01319419
Vues:
23
Hi Don,

Also to note in case you weren't aware, the reader only allows forward navigation.
Tim

>I am trying to figure out how to review the records retrieved with a SqlDataSource in code without using a display control. My research thus far suggests this can be done via a DataReader but I am unable to figure it out. If the datasource is SqlDataSource1 and it is configured to return a DataReader, can someone show me how to get at the records with VB? Something like:
>
><<pseudo code>>
>dim oReader as Data.SQLClient.SQLDataReader = SqlDataSource1.DataReader
>
> While oReader.Read()
>    Console.WriteLine(String.Format("{0}, {1}", oReader(0), oReader(1)))
> End While
>
>
>Thanks
Timothy Bryan
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform