Ver Mensaje Individual
  #1 (permalink)  
Antiguo 06/05/2007, 02:58
PACO_TORG
 
Fecha de Ingreso: marzo-2007
Mensajes: 53
Antigüedad: 18 años, 1 mes
Puntos: 0
consulta sql pero no muestra nada en text1 solo en datagrid

hola soy yo de nuevo....ya resolvi mi problema,

no podia sumar las filas de la columna total de mi datagrid, en este datagrid se mostraba una consulta, pues resulta que leyendo el manual de sql hay una forma de sumar, realice otra consulta con un select asi...

Set MiRecordSet = New ADODB.Recordset
MiRecordSet.Open "select piezas, producto2, total from notas_detalle where notanumero = " & Combo1, MiConexion, adOpenDynamic, adLockOptimistic

Set DataGrid1.DataSource = MiRecordSet
Set OtroRECORDSET = New ADODB.Recordset
OtroRECORDSET.Open " SELECT sum(total) from notas_detalle where notanumero = " & Combo1, MiConexion, adOpenDynamic, adLockOptimistic

Set datagrid2.DataSource = OtroRECORDSET

...bueno, pero si quiero poner el resultado en un textbox asi...

Set text1.DataSource = OtroRECORDSET... no me muestra nada..solo me lo muestra en el datagrid..

como corrijo ese problema..