On Wed, 2009-06-24 at 15:29 +0200, Vivien Malerba wrote:

> 
> 
> 
> 2009/6/24 Bas Driessen <[email protected]>
> 
>         
>         On Wed, 2009-06-24 at 10:57 +0200, Vivien Malerba wrote:
>         
>         > 
>         > 
>         >         OK, I have implemented this and when I try to remove
>         >         a row from a data model I get the error: Model does
>         >         not allow row deletion. If I try to append a row, I
>         >         get the error: No INSERT statement provided. 
>         >         
>         >         Does that mean that this feature is not implemented
>         >         for this provider, or am I missing something? I am
>         >         using postgresql 8.3.7.  If it is not implemented
>         >         for postgresql, for which provider is it
>         >         implemented? 
>         >         
>         > 
>         > 
>         > I'm working on a stand alone example, I'll send it to you
>         > ASAP.
>         
>         
>         
>         
>         Thanks. I just have a very basic table called Groups with 2
>         columns  group_id and description, primary key on group_id and
>         some test entries. Loading of the data model works OK as I can
>         retrieve data, but when trying to manipulate the data I get
>         the errors outlined above. An example would be very helpful. I
>         must have missed something.
> 
> You'll find a complete example in samples/WritableSelect which I've
> just committed in git.gnome.org (LIBGDA_4.0 branch) and will be in the
> soon to be released 4.0.3. In git are also 2 corrections which make
> the whole thing work.


OK, this starts to work now. The issue I have now is related to quotes
not being used for column names. I have a table called Groups. 2
columns. group_id and desc (from description). As desc is a reserved
work in Postgres, I get the following output:

Computed UPDATE: UPDATE Groups SET group_id=##+0::string, desc=##
+1::string::NULL WHERE group_id = ##-0::string
Computed DELETE: DELETE FROM Groups WHERE group_id = ##-0::string
Computed INSERT: INSERT INTO Groups (group_id, desc) VALUES (##
+0::string, ##+1::string::NULL)

ERROR append: syntax error at or near "desc"
LINE 1: INSERT INTO Groups (group_id, desc) VALUES ('T2', 'Test2')

in case of Postgresql this needs to be:

INSERT INTO Groups ("group_id", "desc") VALUES ('T2', 'Test2')

I did add those quotes in libgda V3 for postgresql and mysql (I believe
they use `), but as the whole structure has changed now, I haven't got
the time yet to find out where to add this. Can you please advise where
to add this in the LIBGDA_4.0 branch or if it is a small job, just add
the quotes?

Thanks,
Bas.




_______________________________________________
gnome-db-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gnome-db-list

Reply via email to