Re: EOModeler syntax error
Re: EOModeler syntax error
- Subject: Re: EOModeler syntax error
- From: Ben Schwartz <email@hidden>
- Date: Thu, 04 Mar 2004 12:03:45 -0500
Ok, thanks I'm going to try it like that - but is there a way to edit the
SQL syntax - I'd just like to know in general, as in this case just adding a
space would fix the problem.
Thank you,
Ben
On 3/4/04 11:57, "Kieran Kelleher" <email@hidden> wrote:
> USER is a reserved word in MySQL (a function actually), so change it to
> something else for that table.
>
>
> ________________________________________________________________
> Config = OS X 10.3.2 / Java 1.4.1 / WO 5.2.2 / MySQL 4.0.18 /
> Connector-J 3.0.11
> Blog: http://webobjects.webhop.org/
>
>
> On Mar 4, 2004, at 11:13 AM, Ben Schwartz wrote:
>
>> Hi,
>>
>> I'm new to the WO world and I'm trying out some code generation with
>> EOModeler.
>> I created a model of a MySQL table in there, and saved that model - I
>> then
>> wanted to start populating that db so I decided to use the "Display
>> Group
>> Component" within New Project > Display Group Component in Xcode. It
>> works
>> great and makes a page where I should be able to insert new records in
>> the
>> DB. Unfortunately when I input a new record and tell it to save to the
>> db
>> here is the error message I get:
>>
>> Error: com.webobjects.eoaccess.EOGeneralAdaptorException:
>> EvaluateExpression failed: : Next exception:SQL State:42000 -- error
>> code:
>> 1064 -- msg: Syntax error or access violation: You have an error in
>> your SQL
>> syntax near 'User(pk, password, username) VALUES (1, 'password',
>> 'ben')' at
>> line 1
>>
>> The reason why that syntax is wrong is because there is no space
>> between
>> "User" and the first "(" . The problem is that the SQL syntax is
>> generated
>> by either Xcode or EOModeler - I don't know which one and that's where
>> I
>> need help. Is there something I am doing wrong for the syntax to be
>> wrong
>> and is there a place where I could manually change it for the syntax
>> to be
>> correct?
>>
>> Thanks very much in advance for your help,
>>
>> -Ben
>> _______________________________________________
>> webobjects-dev mailing list | email@hidden
>> Help/Unsubscribe/Archives:
>> http://www.lists.apple.com/mailman/listinfo/webobjects-dev
>> Do not post admin requests to the list. They will be ignored.
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.