[gnome-db] DbGrid



Hi, friends...
I' am in problems again. I'm trying to use DBGrid (gnome-db-grid), After I made the connection, dbgrid widget shows recordset fields names in the columns, but dont appear any row of data.

rs = gda_recordset_new ();
gda_recordset_set_connection (rs,cnc);
gda_recordset_open_txt (rs,"select * from prueba",GDA_OPEN_FWDONLY,GDA_LOCK_OPTIMISTIC,0); gda_recordset_move_first (rs);
gnome_db_grid_set_recordset( GNOME_DB_GRID(dbgrid1), rs );
gnome_db_grid_refresh( dbgrid1 );


And the warnings are:
Gtk-WARNING **: invalid cast from (NULL) pointer to `GtkCList'
Gtk-CRITICAL **: file gtkclist.c: line 1286 (gtk_clist_column_titles_show): assertion `clist != NULL' failed.


I use glade to generate the gui and the code is:

 dbgrid1 = gnome_db_grid_new (NULL);
 gtk_widget_ref (dbgrid1);
 gtk_object_set_data_full (GTK_OBJECT (app1), "dbgrid1", dbgrid1,
                           (GtkDestroyNotify) gtk_widget_unref);
 gtk_widget_show (dbgrid1);
 gtk_container_add (GTK_CONTAINER (notebook1), dbgrid1);
 gtk_container_set_border_width (GTK_CONTAINER (dbgrid1), 5);

I hope your help, thanks you.

Bye, Juan Andrés.














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