13/04/2005, 09:20
|
| | | Fecha de Ingreso: mayo-2004 Ubicación: México
Mensajes: 2.702
Antigüedad: 20 años, 7 meses Puntos: 0 | |
Asi:
Cn es mi conexion a la BD
Código:
Dim rstemp As ADODB.Recordset
Set rstemp = Nothing
Set rstemp = New ADODB.Recordset
Dim rs1 as new ADODB.Recordset
rstemp.Fields.Append "clave", adSingle
rstemp.Fields.Append "Cantidad", adSingle
rstemp.Fields.Append "Descripción", adChar, 60
rstemp.Fields.Append "P.U.", adSingle
rstemp.Fields.Append "I.V.A.", adSingle
rstemp.Fields.Append "Importe", adDouble
rstemp.Fields.Append "Moneda", adChar, 60
rstemp.Open
Set DataGrid1.DataSource = rstemp
Set rs1 = cn.Execute("sentencia")
Do Until rs1.EOF
rstemp.AddNew
rstemp(0) = rs1(0)
rstemp(1) = rs1(1)
rstemp(2) = rs1(2)
rstemp(3) = rs1(3)
rstemp(5) = rs1(4)
rstemp(6) = rs1(5)
rstemp.Update
rs1.MoveNext
Loop
|