Hi. I'm running in some transaction problems with SQL Server 2K + SP3.
I developed a java application to access my DB and something weird is happening. Imagine this case:
BEGIN TRANSACTION
INSERT INTO table1(ID,description) Values(10,'nothing');
SELECT * FROM table1 WHERE ID = 10;
END TRANSACTION
Now, in the SELECT statement, one row should be returned, but that doesn't happen. It says ID = 10 doesn't exist. Any change that I do during this transaction isn't visible to the next statements I execute.
If I do it without transactions it will work fine, I'll get one record in the SELECT statement.
This has nothing to do with Transaction Isolation right? This only applies to different transactions afaik.
Also my code is fine, I just tested it with another Database in other machine with SQL Server 2K and it's working.
Maybe I configured something wrong (in SQL Server instance or in Database)?
TIA
I developed a java application to access my DB and something weird is happening. Imagine this case:
BEGIN TRANSACTION
INSERT INTO table1(ID,description) Values(10,'nothing');
SELECT * FROM table1 WHERE ID = 10;
END TRANSACTION
Now, in the SELECT statement, one row should be returned, but that doesn't happen. It says ID = 10 doesn't exist. Any change that I do during this transaction isn't visible to the next statements I execute.
If I do it without transactions it will work fine, I'll get one record in the SELECT statement.
This has nothing to do with Transaction Isolation right? This only applies to different transactions afaik.
Also my code is fine, I just tested it with another Database in other machine with SQL Server 2K and it's working.
Maybe I configured something wrong (in SQL Server instance or in Database)?
TIA