Re: [gnome-db] how to use gnome_db_find_dialog





2008/9/23 paragasu <paragasu gmail com>
so.. how i can implement the search function it in V3?
i am thinking using query like
SELECT * FROM account
WHERE name LIKE %##/*name:'username' type:'gchararray'*/%

i can create a GdaDataModel from the sql above.
how to bind the parameter using the input from gtk_entry ?

Here is how to do it (in pseudo code):
* using the SQL, create a GdaQuery
* model =  gda_data_model_query_new (query), you have your data model
* param_list = gda_data_model_query_get_parameter_list (model)
* form = gnome_db_basic_form_new (param_list): the form widget will contain one entry for the 'username' parameter

The contents of the 'model' data model should now automatically be updated with what you enter in the form.

In the V4, things will be easier to understand.

Cheers,

Vivien



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