fREW Schmidt wrote:
Hi all!
We are dealing with some weird issues because our database has silly
column names. Specifically speaking we have a column called 'user'.
user is a reserved word in T-SQL (we are using SQL Server.) Anyway,
this is the error we get:
DBIx::Class::ResultSet::find(): Error executing 'SELECT me.user,
me.password, me.site, me.image, me.ro <http://me.ro> FROM Users me
WHERE ( me.user = ? )': [Microsoft][SQL Native Client][SQL
Server]Incorrect syntax near the keyword 'user'. (SQL-42000)
Is there a standard way around this?
Try putting:
sub setup {
my $self = shift;
$self->storage->sql_maker->limit_dialect('mssql');
$self->storage->sql_maker->quote_char([qw/[ ]/]);
$self->storage->sql_maker->name_sep('.');
return $self;
}
in your DBIx::Class::Schema class.
--
jesper
_______________________________________________
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/[email protected]