Steve Howard writes:
> Has anyone been successful in doing explicit inserts into columns with
> identity properties from PERL? I would appreciate any help, or any
> experience anyone has had with this.
>
> I am using dbi with dbd::odbc, and MS SQL 7.0. autocommit is left on the
> default (off). I have thus far tried unsuccessfully two different ways to do
> this.
> The first way is as follows:
>
> $sth = $dbh->prepare(qq{SET identity_insert $target..$table ON});
> $sth->execute() || print "$target..$table does not have the identity
> property \n";
> table - and that is session-specific normally - I still get the error
> telling me:
>
> Cannot insert explicit value for identity column in table
> <tablename> when IDENTITY_INSERT is set to off.
My guess is that you are getting different physical
connections/sessions. I don't know how/why this happens, though, so it
won't help you much, I'm afraid.
Michael
--
Michael Peppler - Data Migrations Inc. - [EMAIL PROTECTED]
http://www.mbay.net/~mpeppler - [EMAIL PROTECTED]
International Sybase User Group - http://www.isug.com
Sybase on Linux mailing list: [EMAIL PROTECTED]