Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx_espanol thread: =?iso-8859-1?Q?Re:_=5Baspx=5Fespanol=5D_Re:_**=5F=BFC=F3mo=5Fsaber=5Fsi? =?iso-8859-1?Q?=5Fhay=5Fregistros=3F=5F**?=


Message #1 by "Aratz Aranceta" <aaranc@e...> on Fri, 19 Apr 2002 00:43:28 +0200
Gracias.
----- Original Message -----
From: "Raymundo Limon" <raymty@y...>
To: "ASP.Net en Español" <aspx_espanol@p...>
Sent: Thursday, April 18, 2002 11:26 PM
Subject: [aspx_espanol] Re: **_¿Cómo_saber_si_hay_registros?_**


> Solo debes preguntar por la propiedad Read.
>
> if (myReader.Read())
> {
>   // Esto significa que hay registros
> }
> else
> {
>   // Esto significa que NO hay registros
> }
>
> Pudieras realizar esto para saber si NO hay registros
> (utilizando el not "!"):
>
> if (!myReader.Read())
> {
>   // Significa que no hay registros
> }
>
> El "do while" se utiliza en recorrido de registros
> hasta que sea el último registro.
>
> Espero te ayude
>
> --- Ariel Di Stefano <ariel.distefano@d...>
> wrote:
> > Tengo una duda co-listeros..
> >
> > Estoy trabajando con el SQLDataReader,
> >
> > y tengo este código:
> >
> >         myReader = mySqlCommand.ExecuteReader()
> >         do while myReader.read()
> >            if len(myReader("Id").ToString()) > 0
> > then
> >
> > session("IDUser")=myReader("Id").ToString()
> >
> > session("Nombre")=myReader("Nombre").ToString()
> >             session("Login")="OK"
> >            else
> >             session("Login")=""
> >            end if
> >         loop
> >
> > la pregunta ¿Existe una forma diferente de saber si
> > myReader tiene o no
> > registros ????
> >
> > ¿¿¿es decir existe algo asi cómo if not rs.eof() ???
> >
> >
> > ---
> > Usted está suscrito a aspx_espanol como:
> > raymty@y...
> > Para darse de baja, envíe un mensaje en blanco a
> > %%email.unsub%%
> >
> >
> >
> >
>
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Tax Center - online filing with TurboTax
> http://taxes.yahoo.com/
>
> ---
> Usted está suscrito a aspx_espanol como:
> aaranc@e...
> Para darse de baja, envíe un mensaje en blanco a
> %%email.unsub%%
>
>



  Return to Index