FIX: Delete/Insert on Table with Text/Image May Cause Error 38Last reviewed: December 19, 1997Article ID: Q171369 |
The information in this article applies to:
17010 (6.50) SYMPTOMSIn a user-defined transaction, if a row is deleted and then followed immediately with an INSERT operation to a table containing one or more columns of a text or image datatype, the following error messages may be received by the client application:
Msg 5159, Level 16, State 1 OS Error 38(Reached end of file.) on device 'C:\MSSQL\DATA\MASTER.DAT' during bufget The SQL Server is terminating this process.In addition, the following errors may be recorded in the errorlog:
WORKAROUNDTo work around this problem, to not place the DELETE and INSERT operations in the same user-defined transaction.
STATUSMicrosoft has confirmed this to be a problem in Microsoft SQL Server versions 6.0 and 6.5. This problem was corrected in the latest Microsoft SQL Server 6.5 U.S. Service Pack. For information on obtaining the service pack, query on the following word in the Microsoft Knowledge Base (without the spaces):
S E R V P A C K MORE INFORMATIONThe following code segment demonstrates the problem:
use SMS begin transaction delete from SiteControl where SiteCode = 'RDG' and TypeFlag = 1 insert into SiteControl values ('RDG', 1, 0x0)Please note that the problem does not occur every time this sequence of code is executed. In addition, error 38 may occur during database recovery if SQL Server was shut down and restarted after the problem first occurred.
|
Additional query words: Transact-SQL T-SQL tsql tran-sql hang hung locked
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |