Private Function validateRow() As Boolean
Dim i As Integer
Dim iRow As Integer
Dim strUpdate As String
Dim strInsert As String
Dim tFields() As String
Dim sTmp As String
Dim Liberar As Boolean
    
    validateRow = True
    If Not blnFieldChanged Then Exit Function
    
    iRow = SCGrid1.CurrentRow
    ReDim tFields(SCGrid1.Cols - 1)
       
    For i = 0 To SCGrid1.Cols - 1
        sTmp = SCGrid1.Text(iRow, i)
    Select Case i
        Case 1, 2
            tFields(i) = "'" & sTmp & "'"
        Case 0, 3
            tFields(i) = sTmp
          Case 4
                    tFields(i) = IIf(sTmp = "Falso", "False", "True")
        End Select
    Next i
        
    On Error GoTo ErrorHandle
    Se actualiza el valor de la columna Liberar en la tabla Flujo
Embarcaciones Libera
        strUpdate = "update [Flujo Embarcaciones Libera] set "
        strUpdate = strUpdate & SCGrid1.Key(-1, 4) & "=" & tFields(4)
        strUpdate = strUpdate & " where " & SCGrid1.Key(-1, 0) & "=" & tFields(0)
        db1.Execute strUpdate
        StatusBar1.Panels(2).Text = "Embarcacion actualizada"
    initVariables
    On Error GoTo 0
    
Exit Function
ErrorHandle:
    MsgBox err.Description
    validateRow = False
End Function
