I am running XE3 using Advantage 11.1 database components on a 32 bit Windows 7 machine. This application was updated from Advantage 9.x to 11.1. In the OnCalcFields event, the following code is encountered (The code was simplified from the original for testing):

DataSet['acctIDName'] = 'x';

If I set the length of the acctIDName field to 1,2 or 3, the assignment is processed without error. If I set the field length in the table to 4 or more, the Access Violation happens.

The call stack looks like:

004069e7 +067 DD3CRMOut.exe System          141  +0 Move
00ad17b4 +310 DD3CRMOut.exe adsdata                 TAdsDataSet.SetFieldData
0097630e +03a DD3CRMOut.exe Data.DB                 TDataSet.SetFieldData
00964a26 +09a DD3CRMOut.exe Data.DB                 TField.SetData
00965f4b +0a3 DD3CRMOut.exe Data.DB                 TStringField.SetAsAnsiString
00965e7f +02f DD3CRMOut.exe Data.DB                 TStringField.SetAsString
00965fa6 +02a DD3CRMOut.exe Data.DB                 TStringField.SetVarValue
00964789 +051 DD3CRMOut.exe Data.DB                 TField.SetAsVariant
0097668d +0c5 DD3CRMOut.exe Data.DB                 TDataSet.SetFieldValue
00fae02f +087 DD3CRMOut.exe CRMDataModule  1109  +1 TADM.acctTblCalcFields

Note that the error occurs on a move. The AV message states is:

Access violation at address 004069E7 in module 'DD3CRMOut.exe'. Read of address 1410D007

Does anyone have any ideas as to my next direction in trying to find out what is going on? I think I may be related to Unicode vs ASCII strings since that was the biggest change between the two versions of 9.x and 11.1.

Any ideas will be greatly appreciated.

asked 27 Feb '13, 06:23

James's gravatar image

James
41226
accept rate: 0%

edited 27 Feb '13, 08:41

What version of Delphi did you use for your 9.x development? Since we don't have components for 9.x, this isn't just a change in ADS versions, but a change in Delphi versions, as well. (I only mention this because XE3 changed several low-level data types in the TDataSet. These can certainly be a factor.) What is the length of the field that you are populating in the OnCalcFields event? What is the length of the acctIDName field? Finally, do you have a simple re-creation you can send in to Support for analysis? It appears that this is most likely an issue in the TDataSet Descendant.

(27 Feb '13, 10:34) Jed Thomet

@Jed: We used XE for the 9.x development. If the data field is of length 1, 2 or 3, the process runs with error. If the field is 4 or greater, we get the AV. In all cases, we are moving a single character to the field.

I tried to build a test case for you, but of course, if works perfectly.

I don't know what the difference is between the simple test program I constructed and the production program in which the problem appears that makes the difference.

I don't really expect a total solution to the problem (since the cause is so obscure). I am looking for direction as to how to proceed.

(27 Feb '13, 11:03) James

Do you have Update 1 installed for Delphi XE3? I know that's a painful upgrade (full uninstall/reinstall)... There are two QC entries (numbered 109533, 108911) that were XE3 regressions that Embarcadero resolved in Update 1. Both sound like they could be related (particularly 109533). If you already are on Update 1, and if you can debug into the TDataSet Descendant code, I'd suggest a breakpoint on the (single) call to Move in TAdsDataSet.SetFieldData. (That's where I'd start if I had a recreation to look at.) My guess is that the field's DataSize doesn't match the Buffer length.

(27 Feb '13, 11:56) Jed Thomet

We have installed update 1 to XE3. The only thing I have done is to look at the call stack. Your suggestion about doing the trace in the source code is a good one that I will implement. Thank you.

(27 Feb '13, 13:12) James

I have continued to work on this problem. We are now using XE4 and getting the same result. The app containing the problem is currently being maintained in XE (where it builds and runs correctly). The source line in adsdata that gives the access violation is line 7473 (in SetFieldData. It is sending a bad source address to system.move. The AV message in XE4 is Access violation at address 00406ABB in module 'DD3CRMOut.exe'. Read of address 1BC8B007. I am using XE4 with update 1, and Advantage components version 11.10.0.10. Any suggestions would be greatly appreciated.

(31 Jul '13, 10:30) James

I got the same problem. Any solution for this?

link

answered 15 Apr '15, 01:06

Akash%20Prasad's gravatar image

Akash Prasad
1
accept rate: 0%

Your answer to the original question.
If responding to a request for additional information, please edit the question or use the comment functionality.
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×271
×79

Asked: 27 Feb '13, 06:23

Seen: 9,747 times

Last updated: 15 Apr '15, 01:06

Advantage Developer Zone Contact Us Privacy Policy Copyright Info


Powered by Advantage Database Server and OSQA
Disclaimer: Opinions expressed here are those of the poster and do not necessarily reflect the views of the company.