[Dbix-class] last insert ID from MSSQL?
Michael Higgins
linux at evolone.org
Wed Nov 7 20:46:35 GMT 2007
On Fri, 2 Nov 2007 11:15:48 -0700
Marc Mims <marc at questright.com> wrote:
> 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.
Sorry, I've been very busy with non-programmer tasks. (Because that's
mostly what I do.) :(
> 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.)
I did get it.
>
> 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?
What I've found is putting this module in my path seems to bork my
quote_char directive... yep. My queries lack the needed quotes when I
enable the module.
resultset('DATA')->search(
undef,
{ order_by => \'"Invoice #" DESC' }
)->single;
DBIx::Class::ResultSet::single(): DBI Exception: DBD::ODBC::db
prepare_cached failed: [unixODBC][FreeTDS][SQL Server]Incorrect syntax
near the keyword 'To'. (SQL-42000)
'To' being part of the column named 'Bill To', which lacks "" around
it after putting the module in my path.
I'll say also that I'm not entirely sure the problem I was having
was happening consistently. Sometimes it seemed to work where it
hadn't before and vice-versa. I can't seem to make a failing test case
at this point.
So I feel kind of silly, as the problem I had may be the result of a bad
perl library installation, or something.
Anyway, thanks for your help. Let me know if there's anything else I can
do to iron this module out, if you wish to pursue it. Off list is fine,
btw.
Cheers,
--
|\ /| | | ~ ~
| \/ | |---| `|` ?
| |ichael | |iggins \^ /
michael.higgins[at]evolone[dot]org
More information about the DBIx-Class
mailing list