[Dbix-class] can't get PK::Auto with MSSQL thru Sybase
Robert Dobbs
bobisdobbs at hotmail.com
Tue Sep 5 21:05:46 CEST 2006
> > "It is not possible to retrieve the last IDENTITY value after an insert
>done
> > with ?-style placeholders. This is a Sybase limitation/bug, not a
> > DBD::Sybase problem. "
> >
> > Ergh. Anyone know a work-around for this? I searched the list archives
>a
> > bit but didn't find anything recent.
>
>Somewhat related to this:
> https://rt.cpan.org/Ticket/Display.html?id=21260
>
>If the DBB being used or the DB doesn't support it, what should DBIC
>really do?
>
>Personally, I think failing is the only sane answer. I'd much rather
>find out something isn't going to work that way, rather than 2 hours
>later when the data is bogon.
>
>That's assuming there isn't another way to fix this issue...
Merp... from DBI manpage under the explicit function "last_insert_id":
* For some drivers the value may only be available if
placeholders
have not been used (e.g., Sybase, MS SQL). In this case the value
returned would be from the last non-placeholder insert statement.
Bleah. I guess I have to use SQL and be very careful about de-sqlifying
input.
Mark
_________________________________________________________________
Windows Live Spaces is here! Its easy to create your own personal Web site.
http://spaces.live.com/signup.aspx
More information about the Dbix-class
mailing list