EscapeAndQuoteStr no longer public

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
davidmarcus
Posts: 50
Joined: Tue 25 Jan 2005 11:22
Location: Somerville, MA
Contact:

EscapeAndQuoteStr no longer public

Post by davidmarcus » Mon 18 Apr 2011 18:37

Version 4.40 had a public EscapeAndQuoteStr function, but it is not public in 5.55. Is there a reason for this? I was using it.

(I know I'm a bit behind with versions, but I'm trying to catch up.)

AndreyZ

Post by AndreyZ » Tue 19 Apr 2011 09:02

Hello,

Please describe why you need this function.

davidmarcus
Posts: 50
Joined: Tue 25 Jan 2005 11:22
Location: Somerville, MA
Contact:

EscapeAndQuoteStr no longer public

Post by davidmarcus » Tue 19 Apr 2011 12:45

I've been constructing my own SQL statements and assigning them to the TMyQuery.SQL and TMyScript.SQL properties. Then I do Execute. When I use PHP on my Web server to do similar things, I use the mysql_real_escape_string function. In Delphi, I was using EscapeAndQuoteStr. I know I could use parameters, but at the time, it seemed simpler to just construct the SQL myself.

After thinking about it, I suppose the EscapeAndQuoteStr function is no longer public because it doesn't check what character set the connection is using. Since I know the character set I'm using for the connection, I can just write my own EscapeAndQuoteStr function.

AndreyZ

Post by AndreyZ » Tue 19 Apr 2011 13:01

Ok, this function will be public in the next MyDAC build.

davidmarcus
Posts: 50
Joined: Tue 25 Jan 2005 11:22
Location: Somerville, MA
Contact:

EscapeAndQuoteStr no longer public

Post by davidmarcus » Tue 19 Apr 2011 14:41

Thank you.

Post Reply