Board index » delphi » Cannot alter PDX-Table an HD if Aplication is on CD-ROM

Cannot alter PDX-Table an HD if Aplication is on CD-ROM

Hi,

I've got the following Problem. I'm extendig a Setuptool, to do some
changes in the Database Strukture when updating. If I start the
Setuptool from Harddisk everything works fine, but if I create a CD-ROM,
and start it from there, I get the following error (translated from German):

Insufficient Hard-Disk Memory
File or Directory missing
File: D:\vu2\db.old\resttemp.db
Table missing
Table: D:\vu2\db.old\resttemp.db

D:\vu2\db.old is the directory where my Database resides. And I never
had a resttemp.db . The same Error occurs if I copy the SQL-Explorer on
a CD-ROM and execute the same SQL-Statement. I've already tried the same
statement on other tables, and I get the same error.

I use
Delphi 6 German with Service Pack 2
BDE 5.01
Windows NT 4.0 Service Pack 6

Here's the code I use:

procedure TForm1.Button1Click(Sender: TObject);
var
  aQuery: TQuery;
begin
     aQuery:=TQuery.Create(self);
     try

     session.Close;
     session.PrivateDir:='D:\Vu2\db.old';
     session.Open;

     aQuery.DatabaseName := 'D:\Vu2\db.old';

     aQuery.SQL.Text:=
       'alter table kdnotiz '+
       'add notiztaetigkeit char(5)';
     aQuery.ExecSQL;

     finally
       aQuery.Free;
     end;
end;

Thomas

 

Re:Cannot alter PDX-Table an HD if Aplication is on CD-ROM


It turned out, that the problem was that the bde uses the working
directory for some temporary files when executing a alter statement.
So changing it with ChDir to a directory on the HD solved it.

Thomas

Other Threads