I'm using the code bellow to write a LOB to a file. When the file is too big (above 300 Mb), sometimes I receive a "Stream read error" or an "Invalid handle" error. This seems to occour more frequently when my application is being executed on a Windows 2003 Server.
vLobLocator := Qr_SaveCLOB_.LOBField(0); vLobLocator.Seek(vLobLocator.Size * -1, soFromEnd); vLobSize := vLobLocator.Size; if not vLobLocator.IsNull then
Normally this indicates that the TLOBLocator is not properly initialized, but you already check for IsNull, so this should be okay. Can you log the value of TLOBLocator.Size in case of this error?