Colin:
> > > I like the idea of generating the update statement rather than using
> > > updateable result sets. For the duplicate row issue it might be
> > worth> issuing a select count(*) statement prior to the update
> > (with the same
> > > where clause including rowids if the db supports them) and if
> > the returned
> > > count != 1 then give an error msg.
> >
> > Rather than doing the update based on (potentially) propriatory
> > constructslike rowID, why not go have a look at the metadata and
> > get the primary key
> > column(s) and base the query on that?
>
> Two main problems. Firstly you wouldn't believe how many people create
> tables and don't define primary keys for them and secondly there are a
Ugh.
> couple of drivers that don't return primary key information in the
That's unfortunate.
> metadata. The second problem will go away with time but the first
> problem unfortunately is here to stay :-(
Then you're probably on the right track. Get a rowId (or equivalent) on any
query if it is available, and if it doesn't then do a query with all
available columns with the original values to see if you can find the proper
row to update.
Maury...
--
Maury Hammel
Cronus Technologies Inc.
http://www.cronustech.com
|