On Tue, Mar 11, 2003 at 09:20:48AM -0800, Michael Peppler wrote:
> On Mon, 2003-03-10 at 15:50, Tim Bunce wrote:
> > On Mon, Mar 10, 2003 at 02:50:08PM -0800, Michael Peppler wrote:
> > > On Mon, 2003-03-10 at 12:36, Tim Bunce wrote:
> > > > 
> > > > Taking a different tack... *if* @@identity is a sequence and AutoCommit
> > > > is off then then "select max($column) from $table" would get it. No?
> > > 
> > > Yes, that would work.
> > > 
> > > However, the following won't:
> > > 
> > > $sth = $dbh->prepare('insert foo(...) values(?,...)');
> > > $sth->execute('bar', ...);
> > > $id_sth = $dbh->prepare('select max(id) from foo');
> > > 
> > > because now $id_sth resides on a different physical connection. You'd
> > > have to finish() the original $sth,
> > 
> > Can't DBD::Sybase tell it's an insert and automatically finish()
> > after the execute?
> 
> Yes.
> 
> But then you won't be able to reuse that handle to make a second insert
> (as you know, of course).
> 
> I just feel that whatever method I use to try to solve this it'll be
> rather hackish :-(
> 
> Michael
> -- 
> Michael Peppler                              Data Migrations, Inc.
> [EMAIL PROTECTED]                 http://www.mbay.net/~mpeppler
> Sybase T-SQL/OpenClient/OpenServer/C/Perl developer available for short or 
> long term contract positions - http://www.mbay.net/~mpeppler/resume.html

Reply via email to