[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SQL Syntax Checker / Validator
[Thread Prev] | [Thread Next]
- Subject: SQL Syntax Checker / Validator
- From: System64 Development <64xcode@xxxxxxxxx>
- Date: Tue, 5 Nov 2024 00:17:35 +0100
- To: Gambas Mailing List <user@xxxxxxxxxxxxxxxxxxxxxx>
Hi, I am having some issues with text going into text fields in a SQLITE table.I'm using a very rudimentary code that I'm tweaking as I hit a wall [1] hehe.
There is not a procedure in gambas that I can pass the text and it corrects it or warns me that there is a “bug”.
[1]'' Returns a text suitable for SQL queries, removes line breaks and characters not compatible with SQL statements.
Public Function Chek4SQL(strInput As String) As String Dim strOutput As String strOutput = Replace(strInput, Chr(92) & Chr(110), ":") strOutput = Replace(strOutput, Chr(34), "") strOutput = Replace(strOutput, "\n", " ") strOutput = Replace(strOutput, "\r", "") strOutput = Replace(strOutput, "\x00", "") strOutput = Replace(strOutput, Chr(39), Chr(46)) ' ' > . strOutput = Replace(strOutput, Chr(44), Chr(46)) ' , > . Return strOutput End Thaks Martín.
Re: SQL Syntax Checker / Validator | Gianluigi <gradobag@xxxxxxxxxxx> |