As Ramsey pointed out, to compile, this line needs the " escaped in the java 
string:

ERXEOAccessUtilities.evaluateSQLWithEntityNamed(ec, "Sitedata", "SELECT 
'resourceName','address','place' UNION SELECT resourceName,address,place INTO 
OUTFILE '/Users/Gino/Desktop/salesreport.csv' FIELDS TERMINATED BY ',' 
OPTIONALLY ENCLOSED BY '\"' FROM Sitedata;");

FYI, MySQL permissions have three tokens: user, password and client-host. 
Wildcards can be used in client-host.

INTO OUTFILE requires that the user has the FILE privilege, so check that with:

        SHOW GRANTS FOR admin@127.0.0.1;

Also, mysql may not have privileges to write to the output directory (but IIRC 
that's a different error), so try writing to /tmp/salesreport.csv. Also, the 
file cannot already exist.

HTH, Kieran


On Nov 17, 2011, at 10:30 AM, Henrique Gomes wrote:

> 
> I really do not know much about mysql security model. Are you sure you have 
> permissions? Have you tried running that statement on the command line client 
> for mysql?
> 
> Can't really help more than that, sorry.
> 
> HG
> 
> 
> On Nov 15, 2011, at 12:08 PM, Gino Pacitti wrote:
> 
>> But how is that so?
>> 
>> Other SQL statements are evaluated using the WO EOUtilities Class with no 
>> problem... Am I not providing using info?
>> 
>> GIno
>> On 15 Nov 2011, at 09:47, Henrique Gomes wrote:
>> 
>>> 
>>> On Nov 14, 2011, at 11:34 PM, Gino Pacitti wrote:
>>> 
>>>> Access denied for user 'admin'@'127.0.0.1'
>>> 
>>> Sounds like the root cause right there....
>>> 
>>> HG
>>> 
>>> _______________________________________________
>>> Do not post admin requests to the list. They will be ignored.
>>> Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
>>> Help/Unsubscribe/Update your Subscription:
>>> http://lists.apple.com/mailman/options/webobjects-dev/ginokris%40mac.com
>>> 
>>> This email sent to ginok...@mac.com
>> 
> 
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/webobjects-dev/kelleherk%40gmail.com
> 
> This email sent to kelleh...@gmail.com

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to