Hi Vivien, I have wrote the db connection string inside your text below.
I have one more question about "libgda-ui read-write form": How to display Check Buttons in the form? My project has described in my Redmine Project Management, and the code are placed in SVN Server. I use Anjuta to compile it. May I add you to the project? Then you can see the code and can commit your changes to the SVN. 2012/2/1 Vivien Malerba <[email protected]> > > > On 1 February 2012 14:12, Kirill Scherba <[email protected]> wrote: > >> Hi, >> >> I have try to use libgda-ui read-write form. >> I have an error in function >> 'gda_data_select_compute_modification_statements': Can't get the prepared >> statement's actual statement. My SQL table is simple and my code is >> simmilar to the gdaui-demo-5.0 sample. >> What's wrong? >> > > Could be a bug in the database provider, which one are you using? It would > help if could send me the part of your code which deals with this so I can > reproduce it myself. > cnc = gda_connection_open_from_string ("SQLite", "DB_DIR=db;DB_NAME=ksnews.db.sqlite", NULL, GDA_CONNECTION_OPTIONS_NONE, &error); > > >> >> I have looked to the gda_data_select_set_modification_statement () and >> can't understand how to write SQL request for mod_stmt parameter - what >> format etc... ?? >> >> > The doc is not very good on this, I obviously need to improved on that > point... Anyway, the rule when creatin an INSERT, UPDATE or DELETE > statement is to use variables named "[+-]<column_number>" where the "+" > will be mapped to new value in the data model at column <column_number> and > the "-" will be mapped to existing values. > > For example the "+1" variable will be set to the new value of the second > column (since numbering start at 0), and "-3" will be set to the existing > value of the 4th column. > > For example an INSERT will look like "INSERT INTO mytable (id, name, when) > VALUES (##+0::int, ##+1::string, 'now')" and the DELETE will be like > "DELETE from mytable WHERE id=##-0::int" (assuming for example that the > "mytable" table has a PK defined as the ID column). > > When the INSERT, UPDATE and DELETE statements are defined, the data model > is made writable and everytime it is modified, the corresponding statement > is executed. > > You can use gda_data_select_set_modification_statement_sql() or > gda_data_select_set_modification_statement() to set an UPDATE, DELETE or > INSERT statement. > > To study it I have used libgda documentation at the >> http://developer.gnome.org/libgda/5.0/, and examples from the >> libgda-5.0.2 sources pacage. Is there any other documentation and some >> examples about my questions?? >> > > Not that I know of. > > Regards, > > Vivien >
_______________________________________________ gnome-db-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/gnome-db-list
