db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joseph Amaya <joecool_30...@yahoo.com>
Subject Re: MSSQL Insert Problem
Date Wed, 18 Oct 2006 18:46:18 GMT
Hello,

1. My procedure is to run the jdbc Ant task
2. Then I change my schema to autoIncrement="true" for
my Identity table, it already has primayKey="true"
3. Then I run the default task for build-torque
4. I don't set my identity column in my program, but
when I attempt to save I get the TorqueException

"Cannot insert explicit value for identity column in
table 'CONTACTS' when IDENTITY_INSERT is set to OFF."

Andaras Says:

    I have used torque with mssql successfully.
What is not clear to me why you want to insert in the
identity column.
Did you declare the column in the schema as
primaryKey="true" 
autoIncrement="true" ?
If yes than Torque should do the insert into your
CONTACTS table 
correctly and even read the new value
of the column after insert.

Best regards,
Andras.


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


Mime
View raw message