Home > Archive > Programming with dBASE > November 2006 > Bug? in changing field size









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Bug? in changing field size
Peter Krarup

2006-10-31, 7:13 pm

I tried, what I thought was a simple operation, changing a field from 2 to 3 characters in a database hba with an index and a big – around 150 Mb – blob file, but I got the message:

Alert
Database Engine Error: Read failure

and following files were created:
Tem12.tmX
Tem12.tmT
Tem12.tmp

but the hba file was still intact.


Then I tried:
use zzz //an empty file with the new structure
appe from hba
copy to hba

I got the Alert and the Tem-files again and hba was reduced in size, but the zzz file was OK.


Then I had to go the hard way of programming:
use zzz
copy stru to hba prod
use hba

and then replace all fields of all records one by one from zzz to hba.


By the way: Is there not an easier way to copy binary from table to table instead of copying to an image-file and then replace binary from that file?

Kind regards
Peter Krarup
Les Shewchuk

2006-10-31, 7:13 pm

It's either a limit or a bug in the BDE. A few of us have bumped into it.

After a component file (dbf, mdx, dbt and such) hits a certain size, bulk
command such as copy or pack or a restructure do not work.

In the case of a restructure, a new set of files is created, the BDE then
copies the data from your tables to the temp tables, the old files are
destroyed and the new files are renamed to the original names. This saves
your original information from damage if/when this goes wrong.

The fault is in the size of the temporary files used to make these commands
work. Once these reach a certain size...Kaboom!!!

For now, what you did seems to be the only way around it.

Les Shewchuk


"Peter Krarup" <pk@force.dk> wrote in message
news:xXQCe9N$GHA.880@news-server...
>I tried, what I thought was a simple operation, changing a field from 2 to
>3 characters in a database hba with an index and a big - around 150 Mb -
>blob file, but I got the message:
>
> Alert
> Database Engine Error: Read failure
>
> and following files were created:
> Tem12.tmX
> Tem12.tmT
> Tem12.tmp
>
> but the hba file was still intact.
>
>
> Then I tried:
> use zzz //an empty file with the new structure
> appe from hba
> copy to hba
>
> I got the Alert and the Tem-files again and hba was reduced in size, but
> the zzz file was OK.
>
>
> Then I had to go the hard way of programming:
> use zzz
> copy stru to hba prod
> use hba
>
> and then replace all fields of all records one by one from zzz to hba.
>
>
> By the way: Is there not an easier way to copy binary from table to table
> instead of copying to an image-file and then replace binary from that
> file?
>
> Kind regards
> Peter Krarup



Petr Krarup

2006-11-03, 7:13 pm

Les Shewchuk Wrote:

> It's either a limit or a bug in the BDE. A few of us have bumped into it.
>
> After a component file (dbf, mdx, dbt and such) hits a certain size, bulk
> command such as copy or pack or a restructure do not work.
>
> In the case of a restructure, a new set of files is created, the BDE then
> copies the data from your tables to the temp tables, the old files are
> destroyed and the new files are renamed to the original names. This saves
> your original information from damage if/when this goes wrong.
>
> The fault is in the size of the temporary files used to make these commands
> work. Once these reach a certain size...Kaboom!!!
>
> For now, what you did seems to be the only way around it.
>
> Les Shewchuk
>
>
> "Peter Krarup" <pk@force.dk> wrote in message
> news:xXQCe9N$GHA.880@news-server...
>
>

Thank you, Less.
Then I will contunue the - rather strange - way.
Kind regards
Peter


Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com