' Convert from string to hexadecimal ' expC1 String Public Function StringToHexadecimal(ByVal tcString As String) As String Dim lcString As String = "" Dim lnCounter As Integer = 0 For lnCounter = 1 To tcString.Length lcString = lcString + Hex(Asc(Mid(tcString, lnCounter, 1))) Next Return lcString End Function ' Convert from hexadecimal to string ' expC1 String in hexadecimal Public Function HexadecimalToString(ByVal tcString As String) As String Dim lcString As String = "" Dim lnCounter As Integer = 0 For lnCounter = 1 To tcString.Length Step 2 lcString = lcString + Chr("&H" + Mid(tcString, lnCounter, 2)) Next Return lcString End FunctionIf my string is this:
SQL: Column 'NOCOUNTRY' is not found. SELECT Country.NoCountry AS Name,Country.Numero AS PrimaryKey FROM Country ORDER BY 1Doing the following:
lcHtml=oApp.HexadecimalToString(oApp.StringToHexadecimal(cHtml))Would return this:
SQL: Column 'NOCOUNTRY' is not found.ÚÚSELECT Country.NoCountry AS Name,Country.Numero AS PrimaryKey FROM Country ORDER BY 1Anyone knows what I would need to adjust in the functions to avoid such situations?