Ver Mensaje Individual
  #2 (permalink)  
Antiguo 30/04/2010, 20:09
Trulala de cordoba
 
Fecha de Ingreso: octubre-2000
Mensajes: 1.692
Antigüedad: 23 años, 6 meses
Puntos: 19
Respuesta: ayuda ADO.NET

Hola para leer datos sería así:

Código PHP:

myConnection 
= New SqlConnection("server=localhost;uid=sa;pwd=;database=pubs")
'establishing connection. you need to provide password for sql server
Try

myConnection.Open()
'
opening the connection

myCommand 
= New SqlCommand("Select * from discounts"myConnection)
'executing the command and assigning it to connection 
dr = myCommand.ExecuteReader()

While dr.Read()

'
reading from the datareader
MessageBox
.Show("discounttype" dr("discounttype").ToString())
MessageBox.Show("stor_id" dr("discounttype").ToString())

displaying the data from the table
End 
While

dr.Close()
myConnection.Close()

Catch 
As Exception

End 
Try 
podes ver mas sobre como obtener datos aca:
http://www.elguille.info/NET/adonet/...cuteScalar.htm
__________________
PD: Con amor, fe, amor a Dios y amistad podemos hacer un mundo mejor!!!!