Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Records Disappear

Status
Not open for further replies.

qsac

Programmer
Jan 22, 2002
242
US
I add a record on EM, and it just disapears.

I am so lost, i dont get where it goes.

Anyone ever see this?


Thanks,
Q
 
How are you adding it and what do you mean it disappears? Are you refreshing your screen?

-SQLBill

Posting advice: FAQ481-4875
 
i jsut add the record in EM.

one of the fields in an Increment seed.

So i add the record in EM, and go to next line. It is there. I execute a select * and it is gone. Than i add a next record and the seed goes up again, like the first record is tehre.

This is very weird
 
try selecting the record based on the "missing" seed like

SELECT * FROM MyTable WHERE "SEED_Field" = ??

Of course replace SEED_Field w/ the real column name and the Auto seed value that was entered.

Thanks

J. Kusch
 
Okay, let us say you have the max seed value of 1000.

1000 12:48

you do an insert. SQL Server 'grabs' the next number - 1001 and holds it ready for the input.

1001 'locked for new data'

But now the insert doesn't happen. It's rolled back, not committed, you cancel it, whatever. SQL Server will not release that number. It's used. Then you redo the insert, SQL Server now grabs the next number - 1002. And you get what appears to be an incorrect/missing value.

1000 12:48
1002 12:49

I think that's what you are seeing happen.

-SQLBill

Posting advice: FAQ481-4875
 
GOT IT.

there was a trigger on there that was not formed correctly, so as Bill said, the transaction was rolled back.

What is weird was that, it is an on Insert trigger, and i changed it to an on Delete trigger and the inserttransaction was still rolled back. Once i deleted the trigger, it worked fine.

Thanks for everyones help.

Q
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top