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

Cannot alter PDX-Table on HD if Application 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 on HD if Application is on CD-ROM


"Thomas Moser" <thomas.mo...@porsche.co.at> schrieb im Newsbeitrag
news:3EA663FA.8050904@porsche.co.at...

Quote
> 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.

Here are my hints:
(i'm not shure, if it solves your problems)

- update to BDE 5.11
  http://info.borland.com/devsupport/bde/bdeupdate.html
  ftp://ftpc.borland.com/pub/bde/devsupport/updates/bde511ge.exe   (~12 MB)

- do not set the PrivateDir to your database directory

     session.PrivateDir:='C:\winNT\tmp';  // better: use GetTempPath

- set the NetDir to a directory with write access
     session.NetDir:='C:\winNT\tmp';  // better: use GetTempPath

Andreas

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


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


Thank you Andreas for your hint.

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