Re: [gnome-db] GdaQuery setup question

On 9/14/07, Daniel Espinosa <esodan gmail com> wrote:
> I'm trying to create a new GdaQuery
> I'm doing the following:
> 1) create a new query and set it's type  to INSERT
> 2) create a new target and set to query
> 3) create a new condition and set its type to LEAF_EQUAL

You can't have any condition in an INSERT statement.

> 4) I need to create a new GdaQueryField to set the operator
> I don't find any function to create a new QueryField using just the
> Target and field's name.
> How can I do it?

I assume you want to create a GdaQueryFieldField object using a
pointer to a GdaQueryTarget and a field name, then use:
                        "dict", gda_object_get_dict (GDA_OBJECT (query)),
                        "query", query,
                        "target", your_target_pointer, "field_name",
field, NULL);

> Could be added a function like:
> GdaQueryField*
> gda_target_new_field_by_name (GdaQueryTarget *target, const gchar* name);

Ok, I'll add such a function, which will contain the code above, then.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]