equivalencia vb6 & vb.net

27/05/2005 - 09:49 por Sonia | Informe spam
hola
sabeis a q puede equivaler esta linea de vb6 con vb.net??

If Not (PMData.Recordset.EOF = True And PMData.Recordset.BOF = True) Then



el problema esta en q tengo un datagrid rellenado y tengo q comprobar si en
alguna columna de ese datagrid, los campos 'codigo y fecha' coindicen con
alguna fila de otra tabla de la bd. como lo veia un poco complicado he
mirado como estaba hecho en vb6 y me encuentro con esto. sabeis a q puede
equivaler?

la funcion entera en vb6 era esta:



Private Sub DBGrid1_RowColChange(ByVal LastRow As Object, ByVal LastCol As
Integer)



If Not (DataGrid1.EOF = True And PedData.Recordset.BOF = True) And Not
operando Then

If Not (PMData.Recordset.EOF = True And PMData.Recordset.BOF = True) Then

PMData.Recordset.FindFirst("PEDIDO = " & PedData.Recordset.Fields(0))

If Not PMData.Recordset.NoMatch Then

Label6.Visible = True

Else

Label6.Visible = False

End If

Else

Label6.Visible = False

End If

End If

End Sub
 

Leer las respuestas

#1 Sonia
27/05/2005 - 09:53 | Informe spam
la 1º line ad ela consulta entera esta erronea. la pongo bien:

Private Sub DBGrid1_RowColChange(LastRow As Variant, ByVal LastCol As
Integer)
If Not (PedData.Recordset.EOF = True And PedData.Recordset.BOF = True)
And Not operando Then
If Not (PMData.Recordset.EOF = True And PMData.Recordset.BOF = True)
Then
PMData.Recordset.FindFirst "PEDIDO = " &
PedData.Recordset.Fields(0)
If Not PMData.Recordset.NoMatch Then
NM.Visible = True
Else
NM.Visible = False
End If
Else
NM.Visible = False
End If
LPedData.RecordSource = "SELECT * FROM LINEA_PEDIDO WHERE ID_PEDIDO
= " & PedData.Recordset.Fields(0)
LPedData.Refresh
End If
End Sub


"Sonia" escribió en el mensaje
news:
hola
sabeis a q puede equivaler esta linea de vb6 con vb.net??

If Not (PMData.Recordset.EOF = True And PMData.Recordset.BOF = True) Then



el problema esta en q tengo un datagrid rellenado y tengo q comprobar si


en
alguna columna de ese datagrid, los campos 'codigo y fecha' coindicen con
alguna fila de otra tabla de la bd. como lo veia un poco complicado he
mirado como estaba hecho en vb6 y me encuentro con esto. sabeis a q puede
equivaler?

la funcion entera en vb6 era esta:



Private Sub DBGrid1_RowColChange(ByVal LastRow As Object, ByVal LastCol As
Integer)



If Not (DataGrid1.EOF = True And PedData.Recordset.BOF = True) And Not
operando Then

If Not (PMData.Recordset.EOF = True And PMData.Recordset.BOF = True) Then

PMData.Recordset.FindFirst("PEDIDO = " & PedData.Recordset.Fields(0))

If Not PMData.Recordset.NoMatch Then

Label6.Visible = True

Else

Label6.Visible = False

End If

Else

Label6.Visible = False

End If

End If

End Sub




Preguntas similares