Re: multiple selectKeys in same transaction; wrong value coming out

2005-10-13 Thread reuben
Sybase, unfortunately, not MSSQL. I took out the batch from the transaction, and everything now works. I don't understand why it made a difference (the selectKeys were *not* in the same batch, just in the same transaction) but oh well. Larry Meadors wrote: Can you try this using scope_id

Re: multiple selectKeys in same transaction; wrong value coming out

2005-10-12 Thread Larry Meadors
Can you try this using scope_identity() instead of @@identity? That *may* fix the problem. Larry On 10/12/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hello, I am doing the following within one transaction: > > createJob(Job job); > > [somewhat heavy calculations that don't belong in the

multiple selectKeys in same transaction; wrong value coming out

2005-10-12 Thread reubenf
Hello, I am doing the following within one transaction: createJob(Job job); [somewhat heavy calculations that don't belong in the batch] begin batch: createDeployment(Deployment deployment); ... end batch; My problem is that after the batch is run, the deployment has the job's id. (Th