Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Catalyst: Users

Auto_increment in MS SQL

 

 

Catalyst users RSS feed   Index | Next | Previous | View Threaded


tech at swattermatter

May 29, 2009, 12:48 PM

Post #1 of 2 (419 views)
Permalink
Auto_increment in MS SQL

I have my Catalyst system hooked up to a MS SQL Server (thanks
Johannes), but I am running into a problem with the auto_increment system.

It seems that MS SQL server uses something called an IDENTITY column to
do it's auto incrementing. This is fine and I have it set up and
working. However, when I try to write something to a table other then
the first table accessed, I get an error with the Identity locking. It
wants me to lock the table, then write to it and then unlock it.

How do you guys get around this problem? Should I just give up on the
auto_increment and write a function to do it myself? Is there a proper
way to do it?

_______________________________________________
List: Catalyst[at]lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst[at]lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


jshirley at gmail

May 29, 2009, 1:05 PM

Post #2 of 2 (384 views)
Permalink
Re: Auto_increment in MS SQL [In reply to]

On Fri, May 29, 2009 at 12:48 PM, Ascii King <tech[at]swattermatter.com> wrote:

> I have my Catalyst system hooked up to a MS SQL Server (thanks Johannes),
> but I am running into a problem with the auto_increment system.
>
> It seems that MS SQL server uses something called an IDENTITY column to do
> it's auto incrementing. This is fine and I have it set up and working.
> However, when I try to write something to a table other then the first table
> accessed, I get an error with the Identity locking. It wants me to lock the
> table, then write to it and then unlock it.
>
> How do you guys get around this problem? Should I just give up on the
> auto_increment and write a function to do it myself? Is there a proper way
> to do it?
>
> _______________________________________________
> List: Catalyst[at]lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive:
> http://www.mail-archive.com/catalyst[at]lists.scsys.co.uk/
> Dev site: http://dev.catalyst.perl.org/
>


Catalyst can't talk to a database. Are you using DBIx::Class, if so there
is a separate list for that.

Thanks,
-Jay

Catalyst users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.