[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: SQL Syntax Checker / Validator
[Thread Prev] | [Thread Next]
- Subject: Re: SQL Syntax Checker / Validator
- From: Gianluigi <gradobag@xxxxxxxxxxx>
- Date: Tue, 5 Nov 2024 09:28:05 +0100
- To: user@xxxxxxxxxxxxxxxxxxxxxx
Il 05/11/24 00:17, System64 Development ha scritto:
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.
Hi Martin, maybe this can be helpful? https://gambaswiki.org/wiki/comp/gb.db/db/subst Regards Gianluigi
SQL Syntax Checker / Validator | System64 Development <64xcode@xxxxxxxxx> |