Re: [gnome-db] problem: row highlighting on insert / modify
- From: "Murray Cumming" <murrayc murrayc com>
- To: "Neil Zanella" <nzanella gmail com>
- Cc: GNOME-DB List <gnome-db-list gnome org>
- Subject: Re: [gnome-db] problem: row highlighting on insert / modify
- Date: Tue, 23 Nov 2004 11:08:24 +0100 (CET)
> consider the action of pressing a button to
> insert a row into
> an SQL database. Once the row is inserted successfully I want to be able
> to
> highlight it in the table widget that shows it. I could try to match the
> primary
> key. The problem is that, in converting back and forth from C data types
> to
> SQL types, some formatting changes etc... may have taken place so this
> method is not that suitable.
What kind of formatting changes? I hope you are not confusing the data
with the visual representation of the data.
> What I need then, is a pointer to the GdaRow
> in the GdaDataModel, which, alas, is not returned on INSERT statements
> by libgda. How can I tackle the "highlighting inserted row" problem just
> described using libgda and plain C data structures in a reliable way?
Are you using auto-generated primary keys? If so, then
gda_connection_get_last_insert_id() might be useful, but I think it's
conceptually flawed, as discussed at the end of this bug:
http://bugzilla.gnome.org/show_bug.cgi?id=143597
For now, I generate the new primary key values in my application, so I
know what has been added.
Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]