[Gambas-user] How to input quotation mark in TextBox.Text to mysql

Emil Tchekov emil at ...1913...
Wed Apr 29 14:06:35 CEST 2009


Hi,

I had this problem in the "good old" VBA too.

my solution:

use chr(39)!!!

also

strSQL= ...+"Address="+chr(39)+TextBoxXXX.Text+chr(39)+...

result will be as you wish it


kind regards


Emil


P.S. I am not sure or the corect syntax of the CHR function in Gambas, you
have to see for this (may be chr$() etc.)




-----Ursprungliche Nachricht-----
Von: webs37 [mailto:webs37 at ...626...]
Gesendet: Mittwoch, 29. April 2009 13:25
An: gambas-user at lists.sourceforge.net
Betreff: [Gambas-user] How to input quotation mark in TextBox.Text to
mysql



Hi all,

Please help.., I have error message:"Query failed: You have an error in SQL
syntax, check the manual that corresponds to MySQL server version for the
right syntaxto use near 'an',address='Saudi Arabia"

I want to input text that have a quotation mark like "al Qur'an"

here these the syntax:

syntax "edit = "UPDATE tbl_user set title='" & TextBox32.Text &
"',publisher='" & TextBox35.Text & "',year='" & TextBox33.Text &
"',volume='" & TextBox39.Text & "',colation='" & ComboBox14.Text &
"',isbn='" & TextBox53.Text & "',city='" & an1!id_city & "',publisher='" &
ana3!id_log & "',subject='" & an2!id_log & "',distribution='" & ana4!id_log
& "',hp='" & TextBox36.Text & "',status='" & Label159.Caption & "' WHERE
id='" & Label92.Caption & "'"
rsedit = connection.Exec(edit)"

any suggestion
thx
--
View this message in context:
http://www.nabble.com/How-to-input-quotation-mark-in-TextBox.Text-to-mysql-t
p23193181p23193181.html
Sent from the gambas-user mailing list archive at Nabble.com.


----------------------------------------------------------------------------
--
Register Now & Save for Velocity, the Web Performance & Operations
Conference from O'Reilly Media. Velocity features a full day of
expert-led, hands-on workshops and two days of sessions from industry
leaders in dedicated Performance & Operations tracks. Use code vel09scf
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
_______________________________________________
Gambas-user mailing list
Gambas-user at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user





More information about the User mailing list