If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Delphi, C etc > Access violation in IDAPI32.DLL

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-13-08, 17:11
mber mber is offline
Registered User
 
Join Date: Feb 2008
Posts: 1
Access violation in IDAPI32.DLL

A shout-out to the Delphi gods:

Im maintaining a Delphi7 application that uses Paradox tables (BDEv5.2.0.2).
One of its functions is to export records from a table to a txt file in a fixed format. There are some 289 fields in the source table(s) and the user can export any number of these fields. The record length with all 289 fields is 4132 bytes. The export is successful when the number of fields to export is limited (that is, if the record size is 4096 bytes or less). However, if all the fields are exported, the app gets an error: "Access violation at address 4BDE68FC in module IDAPI32.DLL." The funny thing is that if there is only one record in the source table, all the fields can be exported successfully; on multiple records, it gets the access violation error.
When I ran it in debug mode, it was failing on the Post of the second record. Here is the gist of the code:

while not ExpSet.EOF do //while not last rec
begin
try
Common.CopyRecordFldsByName(FldBuf, ExpSet); //copy fields
with FldBuf do if Assigned(BeforePost) then BeforePost(FldBuf);
TblTextFile.Append;
CopyToText(IntMap); //copy values to txt
TblTextFile.Post; //<--- fails here on 2nd rec
except
on ESkipRecord do; //Do nothing
on E: Exception do
begin
TblTextFile.Cancel;
Inc(FIxpErrCount);
LogIxpError(GauImpExp.Progress + 1, E.Message);
if ChkAbortOnErr.Checked and
(FIxpErrCount >= BtnMaxErrors.Position) then
Break;
end;
end;

For anyone that can help me, I thank you in advance.

Last edited by mber; 02-13-08 at 17:22.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On