I have the following code: $Query = "" QueryArray[0] = "insert into products_description" QueryArray[1] = "(products_id,language_id,products_name,products_description,products_format)" QueryArray[2] = "values (" & NewProductID & ",1,'" & TitleTextBox.Text & "','" & DescriptionTextArea.Text & "'," & FormatID & ")" LengthOfQuery = 2 FOR QueryIndex = 0 TO LengthOfQuery $Query = $Query & QueryArray[QueryIndex] NEXT $Result = DatabaseConnection.$Con.Exec($Query)
Now, it works fine until I try to have a value in DescriptionTextArea.Text with punctuation like apostrophes and quotation marks in them. I get an error in mysql query, always near the punctuation. I imagine the same would happen with my value in TitleTextBox as well if it contained the same punctuation marks. Any ideas that I'm probably just overlooking? Keith ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user