Sub CorrectNull(MyString As String) As String
Try
' Force error
If MyString.Length = 0 Then
Dim MyNewStr As String = ""
Else
Dim MyNewStr As String = MyString
End If
Catch
' Capture the error
Dim MyNewStr As String = ""
End Try
Return MyNewStr
End Sub
Sub CheckNewConDat(MisValNew() As String, MisValDat() As String, i As Int) As String
Dim MiVal As String = ""
Dim MiResult As String = ""
MisValNew(16) = CorrectNull(MisValNew(16)): MisValDat(16) = CorrectNull(MisValDat(16))
MisValNew(17) = CorrectNull(MisValNew(17)): MisValDat(17) = CorrectNull(MisValDat(17))
MisValNew(19) = CorrectNull(MisValNew(19)): MisValDat(19) = CorrectNull(MisValDat(19))
MisValNew(20) = CorrectNull(MisValNew(20)): MisValDat(20) = CorrectNull(MisValDat(20))
MisValNew(23) = CorrectNull(MisValNew(23)): MisValDat(23) = CorrectNull(MisValDat(23))
MisValNew(24) = CorrectNull(MisValNew(24)): MisValDat(24) = CorrectNull(MisValDat(24))
MisValNew(28) = CorrectNull(MisValNew(28)): MisValDat(28) = CorrectNull(MisValDat(28))
If MisValNew(16) <> MisValDat(16) OR MisValNew(17) <> MisValDat(17) OR MisValNew(19) <> MisValDat(19) OR _
MisValNew(20) <> MisValDat(20) OR MisValNew(23) <> MisValDat(23) OR MisValNew(24) <> MisValDat(24) OR _
MisValNew(28) <> MisValDat(28) Then
MiResult = "UPDATE [10Datos] SET LstUpdte ='" & MisValNew(13) & "', "
MiResult = MiResult & "...='" & MisValNew(16) & "', "
MiResult = MiResult & "...='" & MisValNew(17) & "', "
MiResult = MiResult & "...='" & MisValNew(19) & "', "
MiResult = MiResult & "...='" & MisValNew(20) & "', "
MiResult = MiResult & "...='" & MisValNew(23) & "', "
MiResult = MiResult & "...='" & MisValNew(24) & "', "
MiResult = MiResult & "...='" & MisValNew(28) & "' "
MiResult = MiResult & "WHERE sLat = '" & MisValDat(0) & "' and sLng = '" & MisValDat(1) & "' "
Try
If Not(MisValNew(8) = Null) AND Not(MisValNew(8).Contains("'")) Then
MiResult = MiResult & "AND Rotulo = '" & MisValNew(8) & "' "
End If
Catch
LogMemory1("MiResult:" & i & "." & MiResult, "3")
End Try
MiResult = MiResult.Replace("=''", "=null")
End If
Return MiResult
' LogMemory1("CheckNewConDat.lastexception: (" & i & ")." & LastException.Message, "3")
End Sub