29/05/2012, 09:50
|
| | Fecha de Ingreso: mayo-2012
Mensajes: 6
Antigüedad: 12 años, 7 meses Puntos: 0 | |
Respuesta: Guardar comillas simple C#-SQLite yo utilizo esta funcion
Public Function borracomillasimple(ByVal prmcadena As String) As String
Try
Dim cadenaAuxiliar As String
Dim cadenaFinal As String = ""
Dim pos As Integer
cadenaAuxiliar = prmcadena
pos = InStr(cadenaAuxiliar, "'")
While pos <> 0
cadenaFinal = cadenaFinal & Strings.Left(cadenaAuxiliar, pos) & "'"
cadenaAuxiliar = Strings.Right(cadenaAuxiliar, Len(cadenaAuxiliar) - pos)
pos = InStr(cadenaAuxiliar, "'")
End While
cadenaFinal = cadenaFinal & cadenaAuxiliar
borracomillasimple = Trim(cadenaFinal)
Catch ex As Exception
Return ""
End Try
End Function |