Board index » delphi » Nightmares and Paradox corruptions !!

Nightmares and Paradox corruptions !!

I got always problems with Paradox tables on an NT workstation (128 Mo RAM).
Fortunately, I finally arrive to reproduce it whenever I want, by inserting
very quickly a big set of new records in a big Paradox table.
I use for that a Tquery in a Delphi 4 program
    Requestlive=True;
    CacheUpdates=false;
    AutocalcField=false;
    Constrained=false;
    Paramcheck=false;
    Paramcheck=false;
    Unidirectional=False;
    UpdateMode=upwhereall;

On this Tquery I run an SQL basic SELECT * FROM (tablename) where (1st
field)= 10 (for example)
Then I call prepare and open
And then I do a loop like :
  For i:=0 to N-1 do
 begin
   Insert;
   fieldbyname(1stfield).AsInteger :=i;
   fieldbyname(other field concrned by a secondary index).AsInteger :=i;
   Post;
 end
of course I close the table.

when the program is finished, I verify the table with Dtutil32.exe
(downloaded from Borland site). The message is :
"Verification successfull. Verification cannot be completed"
I had checked the table with Paradox 8 software. And It is always the same
error.the last index or the index just before the last are damaged. If I
reduced the record number it works fine. But I just have to increase N for
reproducing the problem.
I think that this code is really not sophisticated !?

I tried each solution read in this newsgroup and others, separately and
together.

More explicitly, I tried :
     Installing the last Service Pack from Microsoft
     Setting local share to True
     Working with block size of 16K rather than 32K
     Increasing SharedMemsize and MaxBuffsize to 8192
     Increasing Memsize to 64
     Changing LangDriver (Pdox ANSI Intl)
     Setting StrictIntegrity to FALSE
     Coding Systematics calls to FlushBuffers after each post
     Increasing the RAM to 256 Mo (better performance but no fix).

The only thing I did not try is to test the program on a W95 or W2K
computer. It will be done early.

The table structure is the following :
 13 Alphanumeric fields (average size 10 )
 16 Numeric fields
  6 Logical fields
 1 primary index on the first numeric field
 7 secondary indexes on one only fields
 2 secondary indexes on a combination (1 numeric field + 1 alphanumeric
field)

I think that it's not a complex structure.

Table's block size = 16
Record's size =326
Number of records : 562510
I have no integrity special parameters.
I am far away from the 1Gb limit (with 16K).
and I have only one table with this size in my Database. I have been
suggested by Bill Todd to change from Paradox to SQL server or Interbase but
just for one table  in my Database ?

My opinion is that Paradox is really not a good database (in terms of
fiability).
It's really a problem for me to change the database. The migration to SQL
server is not as simple as it could seem first and needs to change some
important parts of the code.

Can somebody help me and give me som tips or hints ? Maybe there's something
else to try ?
What about my secondary indexes mixing Alphanumerics and numerics fields ?
What about the table language ? or other BDE Paradox ?

Any help will be appreciated
Regards

 

Re:Nightmares and Paradox corruptions !!


In the TTables' after post, try calling DBISaveChanges, such as:

procedure TfrmTables.tblReportsAfterPost(DataSet: TDataSet);
begin
  DBISaveChanges(TBDEDataSet(DataSet).Handle);
end;

Note that you will have to add 'BDE' to the uses clause.

Ed Dressel

BTW, I have thousands of Paradox users, and *very few* problems. (Less then
5 per year, and that would be high).

Re:Nightmares and Paradox corruptions !!


Hello Yves,

See Tim Sullivan's reponse to "Paradox --> C/S-Database" in this ng for an idea
on porting from Paradox.
I am not a Paradox user (I use Advantage - locally and the server) so I cannot
give you any performance hints.

HTH,

Ken

Quote
Yves wrote:
> I got always problems with Paradox tables on an NT workstation (128 Mo RAM).
> Fortunately, I finally arrive to reproduce it whenever I want, by inserting
> very quickly a big set of new records in a big Paradox table.
> I use for that a Tquery in a Delphi 4 program
>     Requestlive=True;
>     CacheUpdates=false;
>     AutocalcField=false;
>     Constrained=false;
>     Paramcheck=false;
>     Paramcheck=false;
>     Unidirectional=False;
>     UpdateMode=upwhereall;

> On this Tquery I run an SQL basic SELECT * FROM (tablename) where (1st
> field)= 10 (for example)
> Then I call prepare and open
> And then I do a loop like :
>   For i:=0 to N-1 do
>  begin
>    Insert;
>    fieldbyname(1stfield).AsInteger :=i;
>    fieldbyname(other field concrned by a secondary index).AsInteger :=i;
>    Post;
>  end
> of course I close the table.

> when the program is finished, I verify the table with Dtutil32.exe
> (downloaded from Borland site). The message is :
> "Verification successfull. Verification cannot be completed"
> I had checked the table with Paradox 8 software. And It is always the same
> error.the last index or the index just before the last are damaged. If I
> reduced the record number it works fine. But I just have to increase N for
> reproducing the problem.
> I think that this code is really not sophisticated !?

> I tried each solution read in this newsgroup and others, separately and
> together.

> More explicitly, I tried :
>      Installing the last Service Pack from Microsoft
>      Setting local share to True
>      Working with block size of 16K rather than 32K
>      Increasing SharedMemsize and MaxBuffsize to 8192
>      Increasing Memsize to 64
>      Changing LangDriver (Pdox ANSI Intl)
>      Setting StrictIntegrity to FALSE
>      Coding Systematics calls to FlushBuffers after each post
>      Increasing the RAM to 256 Mo (better performance but no fix).

> The only thing I did not try is to test the program on a W95 or W2K
> computer. It will be done early.

> The table structure is the following :
>  13 Alphanumeric fields (average size 10 )
>  16 Numeric fields
>   6 Logical fields
>  1 primary index on the first numeric field
>  7 secondary indexes on one only fields
>  2 secondary indexes on a combination (1 numeric field + 1 alphanumeric
> field)

> I think that it's not a complex structure.

> Table's block size = 16
> Record's size =326
> Number of records : 562510
> I have no integrity special parameters.
> I am far away from the 1Gb limit (with 16K).
> and I have only one table with this size in my Database. I have been
> suggested by Bill Todd to change from Paradox to SQL server or Interbase but
> just for one table  in my Database ?

> My opinion is that Paradox is really not a good database (in terms of
> fiability).
> It's really a problem for me to change the database. The migration to SQL
> server is not as simple as it could seem first and needs to change some
> important parts of the code.

> Can somebody help me and give me som tips or hints ? Maybe there's something
> else to try ?
> What about my secondary indexes mixing Alphanumerics and numerics fields ?
> What about the table language ? or other BDE Paradox ?

> Any help will be appreciated
> Regards

  kbrumback.vcf
< 1K Download

Re:Nightmares and Paradox corruptions !!


Start by checking the number of file-handles you have allocated to
Paradox (in BDE Configuration) and be sure this number is available.
Likewise ensure that all of the indexes are "maintained."

The fact that it's always "the last or the next-to-last index" is a
suspicious clue. This is much, much too consistent behavior to be the
effect of a random error.  You don't tell us what those index
definitions are, and which one (by name) is being corrupted.

I'm not sure where the bug is, Yves, but I think it's going to be in the
application.

For example:  what if you define the fields, using TField objects, and
don't use "FieldByName?"  Variations in how the application is written
might provide useful clues in diagnosing the source of the problem.

Dismissing the Paradox system as "not viable" is, unfortunately, not
very useful.

Quote
>Yves wrote:
> when the program is finished, I verify the table with Dtutil32.exe
> (downloaded from Borland site). The message is :
> "Verification successfull. Verification cannot be completed"
> I had checked the table with Paradox 8 software. And It is always the same
> error.the last index or the index just before the last are damaged. If I
> reduced the record number it works fine. But I just have to increase N for
> reproducing the problem.

------------------------------------------------------------------
Sundial Services :: Scottsdale, AZ (USA) :: (480) 946-8259
mailto:i...@sundialservices.com  (PGP public key available.)
Quote
> Fast(!), automatic table-repair with two clicks of the mouse!
> ChimneySweep(R):  "Click click, it's fixed!" {tm}
> http://www.sundialservices.com/products/chimneysweep

Re:Nightmares and Paradox corruptions !!


Hi Ed

I have a problem with paradox tables.  maybe you could shed some light for
me.
my users can enter data in the table, save the records. and you can see the
new information in the table.  Close the application and receive  an error
message stating that the "Table is corrupt other than header".  Acknowledge
the error and program terminates.  re-starts the application and all of the
data just entered is no longer in the table.  Close the application, runs
paradox table repair utility and finds nothing wrong with the table. What
happend to the data?  Do you know what could cause this error and data input
lost?

This is not happening to all the users... only a few and it seems like no
rime or reason that I can figure out.

I am Delphi 5 CS W/svcpk 1.  Paradox tables are at level 7.
When the form is closed I do not explicitly close the tables But never have.
I assumed the Close form would also close all open files.

Thanks

Herbie

Quote
"Ed Dresel" <none> wrote in message news:3a8ac2fb_1@dnews...
> In the TTables' after post, try calling DBISaveChanges, such as:

> procedure TfrmTables.tblReportsAfterPost(DataSet: TDataSet);
> begin
>   DBISaveChanges(TBDEDataSet(DataSet).Handle);
> end;

> Note that you will have to add 'BDE' to the uses clause.

> Ed Dressel

> BTW, I have thousands of Paradox users, and *very few* problems. (Less
then
> 5 per year, and that would be high).

Re:Nightmares and Paradox corruptions !!


Herbie,
The data is there, the index is corrupted. you should rebuild the table and
the "lost" data will be shown.
I have this problem once in a while. In most of the cases it is when
computer was shutdownd without exiting the software first. (blue screen and
such)
E-mail me and I will send you a free rebuild utility I downloaded from
somewhere. (maybe form Borland's site)
Sraya
Quote
"Herbie" <Herbie_Herb...@Fws.Gov> wrote in message

news:96f4ri$5p93@bornews.inprise.com...
Quote
> Hi Ed

> I have a problem with paradox tables.  maybe you could shed some light for
> me.
> my users can enter data in the table, save the records. and you can see
the
> new information in the table.  Close the application and receive  an error
> message stating that the "Table is corrupt other than header".
Acknowledge
> the error and program terminates.  re-starts the application and all of
the
> data just entered is no longer in the table.  Close the application, runs
> paradox table repair utility and finds nothing wrong with the table. What
> happend to the data?  Do you know what could cause this error and data
input
> lost?

> This is not happening to all the users... only a few and it seems like no
> rime or reason that I can figure out.

> I am Delphi 5 CS W/svcpk 1.  Paradox tables are at level 7.
> When the form is closed I do not explicitly close the tables But never
have.
> I assumed the Close form would also close all open files.

> Thanks

> Herbie

> "Ed Dresel" <none> wrote in message news:3a8ac2fb_1@dnews...
> > In the TTables' after post, try calling DBISaveChanges, such as:

> > procedure TfrmTables.tblReportsAfterPost(DataSet: TDataSet);
> > begin
> >   DBISaveChanges(TBDEDataSet(DataSet).Handle);
> > end;

> > Note that you will have to add 'BDE' to the uses clause.

> > Ed Dressel

> > BTW, I have thousands of Paradox users, and *very few* problems. (Less
> then
> > 5 per year, and that would be high).

Re:Nightmares and Paradox corruptions !!


I don't know what Paradox Table Repair would say about the table but I'd
be interested to know what ChimneySweep says about it.  One cause of
index problems we have seen from time to time has to do with the
table-language, when it is other than ASCII.  (Specifically when the
index language is different from the DB.)  However, this normally
manifests as an index that immediately goes out-of-date.

It is imperative that all of the workstations have the entirely-correct
and entirely consistent settings for NET FILE DIR and LOCAL SHARE.  

Quote
Sraya Malkiel wrote:

> Herbie,
> The data is there, the index is corrupted. you should rebuild the table and
> the "lost" data will be shown.
> I have this problem once in a while. In most of the cases it is when
> computer was shutdownd without exiting the software first. (blue screen and
> such)
> E-mail me and I will send you a free rebuild utility I downloaded from
> somewhere. (maybe form Borland's site)
> Sraya
> "Herbie" <Herbie_Herb...@Fws.Gov> wrote in message
> news:96f4ri$5p93@bornews.inprise.com...
> > Hi Ed

> > I have a problem with paradox tables.  maybe you could shed some light for
> > me.
> > my users can enter data in the table, save the records. and you can see
> the
> > new information in the table.  Close the application and receive  an error
> > message stating that the "Table is corrupt other than header".
> Acknowledge
> > the error and program terminates.  re-starts the application and all of
> the
> > data just entered is no longer in the table.  Close the application, runs
> > paradox table repair utility and finds nothing wrong with the table. What
> > happend to the data?  Do you know what could cause this error and data
> input
> > lost?

> > This is not happening to all the users... only a few and it seems like no
> > rime or reason that I can figure out.

> > I am Delphi 5 CS W/svcpk 1.  Paradox tables are at level 7.
> > When the form is closed I do not explicitly close the tables But never
> have.
> > I assumed the Close form would also close all open files.

> > Thanks

> > Herbie

------------------------------------------------------------------
Sundial Services :: Scottsdale, AZ (USA) :: (480) 946-8259
mailto:i...@sundialservices.com  (PGP public key available.)

- Show quoted text -

Quote
> Fast(!), automatic table-repair with two clicks of the mouse!
> ChimneySweep(R):  "Click click, it's fixed!" {tm}
> http://www.sundialservices.com/products/chimneysweep

Re:Nightmares and Paradox corruptions !!


In the bde configuration check to see if local share = true

Quote
"Herbie" <Herbie_Herb...@Fws.Gov> wrote in message

news:96f4ri$5p93@bornews.inprise.com...
Quote
> Hi Ed

> I have a problem with paradox tables.  maybe you could
shed some light for
> me.
> my users can enter data in the table, save the records.
and you can see the
> new information in the table.  Close the application and
receive  an error
> message stating that the "Table is corrupt other than

header".  Acknowledge
Quote
> the error and program terminates.  re-starts the

application and all of the
Quote
> data just entered is no longer in the table.  Close the
application, runs
> paradox table repair utility and finds nothing wrong with
the table. What
> happend to the data?  Do you know what could cause this

error and data input
Quote
> lost?

> This is not happening to all the users... only a few and
it seems like no
> rime or reason that I can figure out.

> I am Delphi 5 CS W/svcpk 1.  Paradox tables are at level
7.
> When the form is closed I do not explicitly close the

tables But never have.
Quote
> I assumed the Close form would also close all open files.

> Thanks

> Herbie

> "Ed Dresel" <none> wrote in message

news:3a8ac2fb_1@dnews...
Quote
> > In the TTables' after post, try calling DBISaveChanges,
such as:

> > procedure TfrmTables.tblReportsAfterPost(DataSet:
TDataSet);
> > begin
> >   DBISaveChanges(TBDEDataSet(DataSet).Handle);
> > end;

> > Note that you will have to add 'BDE' to the uses clause.

> > Ed Dressel

> > BTW, I have thousands of Paradox users, and *very few*
problems. (Less
> then
> > 5 per year, and that would be high).

Other Threads