Visual Basic - Como paso valores de una sentencia SQL a variables

Life is soft - evento anual de software empresarial
 
Vista:

Como paso valores de una sentencia SQL a variables

Publicado por Froy (185 intervenciones) el 02/12/2003 20:42:44
Hola foro:
tengo lo siguiente:

Private Sub cmb_areas_Change()
Call ConexionDB
Cursores rstCount, "Select * from TPreguntas where area = '" & Trim(cmb_areas.Text) & "' ", cnn
Cursores rstPromedio, "Select Round(CONVERT(DECIMAL(9,2),AVG(preg9)),2), Round(CONVERT(DECIMAL(9,2),AVG(preg10)),2) From TPreguntas where preg9 > 0 ", cnn
If rstCount.RecordCount > 0 Then
txtparticipantes.Caption = rstCount.RecordCount

SI SE DAN CUENTA ESTO ME DEVULVE DOS PROMEDIOS DE LA SENTENCIA SQL.. Y SI LO HACE BIEN, PERO LO QUE QUIERO ES MOSTRARLOS EN UN LABEL, COMO LE HAGO PARA SACAR LOS RESULTADOS SEPARADOS DEL SQL... GRCIAS DE ANTEMANO...
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder