Subject External file is lock after stored procedure is finished
Author Hayashi@apex-jp.com
Hi all

I have a question about external file.

I am using external file to transport data from databaset to database.

Database A export text file and database B import this file by using
external file table.

Once I execute this procedure then text file is locked and I don't edit this
text file. Usually it is not happend. Using external file and I can edit
text file every time eather in transaction or outer transaction.

Why external file is locked? How can I avoid this locking?

This is using stored procedure bellow:

CREATE PROCEDURE SP_IMPORT
AS
...
DECLARE VARIABLE DUMMY CHAR(1);
BEGIN
FOR
SELECT
PD005, PD006, PD009, PD010, PD011,
PD041, PW021, PW022, PW001
FROM L_ASSEMBLY
INTO
:PD005,:PD006,:PD009,:PD010,:PD011,
:PD041,:PW021,:PW022,:PW001
DO
BEGIN
INSERT INTO T_ASSEMBLY (
PD005, PD006, PD009, PD010, PD011,
PD041, PW021, PW022, PW001
)
VALUES(
:PD005,:PD006,:PD009,:PD010,:PD011,
:PD041,:PW021,:PW022,:PW001
);
WHEN SQLCODE -803 DO DUMMY='1';
END
END

best regards

Using Firebird v1.0.3

Tsutomu Hayashi in Japan
Mail : hayashi@...
Web : http://www.apex-jp.com/ (Japanese Only)
http://dmj.psnet.ne.jp/ (Delphi Magazine)