Board index » delphi » AV on reading Source Table and writing Target Table

AV on reading Source Table and writing Target Table

What I am trying to do is convert a table from a DOS TP program I wrote
years ago to a new table in D4. I have done this many times before with
larger tables than this one. The following are the specs of the source
and target Paradox tables.

Source Table:  Level 4, Field count=107, Record size=1147, Records=11688

Target Table: Level 7, Field count=68, Record size=1150
Both have 4 indexes.

I am get an error about 10250 records into the source file. The error
simply displays as 'Access violation at address ____. Read at address
____'. I don't think the address is significant in that it changes
depending on when the program runs. If it is, let me know.

I don't understand what this error means. I am running on a PII 350,
with 64MB RAM. I have tried running outside of the IDE with nothing else
running, except some background stuff, hoping that if it is a memory
issue that would be out of the way.

Any ideas what is this error is trying to tell me? Thanks in advance for
any suggestions.

dick Mathews

 

Re:AV on reading Source Table and writing Target Table


Quote
>I am get an error about 10250 records into the source file. The error
>simply displays as 'Access violation at address ____. Read at address

It could be that your old table is corrupt.
How are you going about inserting the source table into the target?

--
Brian Bushay (TeamB)
Bbus...@NMPLS.com

Re:AV on reading Source Table and writing Target Table


Brian,

I am reading each field from source into a field in the target like

TargetTable.Insert;
TargetTableFieldname.Value := SourceTableFieldname.Value;
........

TargetTable.Post

I thought about corruption also. I looked at the source around that record
and looked good. I tried deleting a few records before and after. It still
errors out at approximately the same record.

dick Mathews

Quote
Brian Bushay TeamB wrote:
> >I am get an error about 10250 records into the source file. The error
> >simply displays as 'Access violation at address ____. Read at address

> It could be that your old table is corrupt.
> How are you going about inserting the source table into the target?

> --
> Brian Bushay (TeamB)
> Bbus...@NMPLS.com

Re:AV on reading Source Table and writing Target Table


It could also be a memory-leak of some kind, of course.  But easily the
best way to handle operations like that is with the TBatchMove
component.

Quote
>dick Mathews wrote:

> Brian,

> I am reading each field from source into a field in the target like

> TargetTable.Insert;
> TargetTableFieldname.Value := SourceTableFieldname.Value;
> ........

> TargetTable.Post

> I thought about corruption also. I looked at the source around that record
> and looked good. I tried deleting a few records before and after. It still
> errors out at approximately the same record.

>{*word*106} Mathews

> Brian Bushay TeamB wrote:

> > >I am get an error about 10250 records into the source file. The error
> > >simply displays as 'Access violation at address ____. Read at address

> > It could be that your old table is corrupt.
> > How are you going about inserting the source table into the target?

> > --
> > Brian Bushay (TeamB)
> > Bbus...@NMPLS.com

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

- Show quoted text -

Quote
> Why =shouldn't= it be quick and easy to keep your database online?
> ChimneySweep(R):  "Click click, it's fixed!" {tm}
> http://www.sundialservices.com/cs3web.htm

Re:AV on reading Source Table and writing Target Table


Quote
>I thought about corruption also. I looked at the source around that record
>and looked good. I tried deleting a few records before and after. It still
>errors out at approximately the same record.

Have you updated the BDE version you are using?  Have you updated Delphi 4 with
the available updates.  If you are running from the original release of D4 that
may be your problem.

Brian
--
Brian Bushay (TeamB)
Bbus...@NMPLS.com

Re:AV on reading Source Table and writing Target Table


Brian,

I am running D4 with update pack 3 and BDE v5.01. I think these are close if not
the latest.

This may be a corruption problem, even though it appears good when viewed by the
DBD. I found it was corrupted when I returned to my machine after making a copy of
it at the client site. I used my old version of Tutility to repair the table. I
viewed this file with my original version of the DOS program and it worked ok. Thus
thinking the repair was successful.

I am going to get a new copy and try that one and see if that one works ok.

dick Mathews

Quote
Brian Bushay TeamB wrote:
> >I thought about corruption also. I looked at the source around that record
> >and looked good. I tried deleting a few records before and after. It still
> >errors out at approximately the same record.

> Have you updated the BDE version you are using?  Have you updated Delphi 4 with
> the available updates.  If you are running from the original release of D4 that
> may be your problem.

> Brian
> --
> Brian Bushay (TeamB)
> Bbus...@NMPLS.com

Re:AV on reading Source Table and writing Target Table


Barry,

I kept looking at the record that it issued the AV and saw nothing. That doesn't
mean that there isn't. I deleted 4 or 5 records before and after that record and
it still died at the same place. That's what's wierd. Unless the remainder of
the records are corrupted, that should have deleted the bad record.

dick Mathews

Quote
"Barry L. Birch" wrote:
> I just imported a 9,000 record client database from comma-separated text
> using Paradox 5. At about 7000 the import would bomb, but Pdox explained
> why. There were embedded unprintable characters in the text in one
> particular field ( mostly carriage returns & line feeds, but also some
> others). I had to scan the csv text file manually and remove those. Problem
> with using a Delphi app to do this, or the DB desktop, you may not be able
> to see these non-printing characters.

> Once I got rid of them, the import worked seamlessly and then I upgraded the
> PX5 set to PX7.
> --
> Barry L. Birch
> AMICUS custom software

Other Threads