[Dbix-class] last insert ID from MSSQL?
Marc Mims
marc at questright.com
Fri Nov 2 18:15:48 GMT 2007
* Michael Higgins <listinfo at banfieldgroup.com> [071029 15:10]:
> On Wed, 17 Oct 2007 12:44:42 -0700 Marc Mims <marc at questright.com>
> >
> > What does $schema->storage->dbh->get_info(17) return?
>
> Marc, it returns "Microsoft SQL Server"
>
> >
> > Assuming get_info(17) returns something useful, what's needed is a
> > trivial little module based on that name that provides
> > _dbh_last_insert_id and _sql_maker_opts. See the source for
> > DBIx::Class::Storage::DBI::ODBC::DB2_400_SQL as an example.
> >
> > If you're not up to writing the module, I'd be happy to put one
> > together you can test.
>
> Well, as I say above, I'm not really up to these kind of tasks. If you
> make something to fix up this glitch, I'd be glad to test it --
> provided you tell me how I'm supposed to use it in my application.
I created a module, attached, using 'SELECT SCOPE_IDENTITY()', which,
after reading the MSFT docs seems to be the most appropriate identity
function.
I sent the module off-list assuming there was no need to reply here
until you had a chance to test it. But I haven't heard from you. Spam
filters, being what they are, I assume its possible you've never seen my
message. So I'll reply here to guard against that possibility. (Not
trying to hurry you---just want to make sure you get the module.)
Anyone else using Microsoft SQL Server? Care to test this small
DBIx::Class storage class to ensure PK::Auto and SQLA Limit syntax work
over and ODBC connection?
-Marc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dbic-odbc-msft.tar.gz
Type: application/octet-stream
Size: 1160 bytes
Desc: not available
Url : http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20071102/f838d2f5/dbic-odbc-msft.tar.obj
More information about the DBIx-Class
mailing list