Use of TBCDField in Aggregate causes access violation in Delphi XE7

I have just converted my application from Delphi 7 to Delphi XE7.
To get the application to compile clean was surprisingly easy.
However, I am now getting access violations in a number of areas.

I have narrowed down the problem to the use of a TBCDField in a aggregate of a ClientDataset.
The back end of my application is SQL Server 2008 R2.
There are a number of fields in the database with a datatype of 'money'.

When you bring in a SQL Server DataType of Money into a dataset (query or clientdataset) Delphi assigns the field a datatype of TBCDField.
When I use a field with a datatype of TBCDFIeld in an aggregate on a Clientdataset, I get an access violation.

I have yet to identify a specific line of code that causes the access violation as it does not occur when I use the aggregate to set a variable in my application.
It appears to occur deeper in the Delphi source code.

I always receive the same address when the error occurs 
'access violation at address 00405881 in module 'STIKS.exe'. Read of address 3030302C'
 but I'm not sure how to translate that into the location of the error in the code.

If I change the datatype of the TBCDField to TFloatField in the Unit and the form, the error goes away.

I use aggregates extensively in my application and am wondering if there is an easier way to resolve the issue other than modifying every unit and form that uses an aggregate.

Any help is greatly appreciated.

Leonard
0
Leonard
11/21/2014 8:46:37 PM
embarcadero.delphi.general 4258 articles. 0 followers. Follow

0 Replies
1071 Views

Similar Articles

[PageSpeed] 58

Reply:

Similar Artilces:

Access Violation Delphi XE7 using IBSQL or IB
Hi, I'm getting an access violation opening a TIBSQL or TIBQuery after upgrading my project to XE 7. The error is being raised in procedure TIBSQL.Prepare and is happening on the following line: bt := Database.Encoding.GetBytes(FProcessedSQL.Text + #0); I'm guessing there's a new property added to one of the IBX components that's not being set. Any ideas? Thanks, Dan Palley Dan Palley wrote: > Hi, I'm getting an access violation opening a TIBSQL or TIBQuery after upgrading my project to XE 7. The error is being raised in procedure TIBSQL.Prepare...

InplaceMemo causes access violation in Delphi 2010
Hi there, the following problem occured with D2010 (the same code in D2007 is still in use an working well): in a component I use a TForm with a TMemo as an inplace editor. Everytime I try access propertys of the Memo I'll get an access violation Here's the code FMemoPopup:= TFInplaceMemo.Create(self); FMemoPopup.Parent:=nil; FMemoPopup.Visible:= false; //FMemoPopup.Memo1.Align:= alClient; //FMemoPopup.Memo1.OnKeyUp:= Memo_KeyUp; //FMemoPopup.Memo1.OnDblClick:= Memo_DblClick; Every of the 3 lines that are now commented cause the violation when uncommented. The TFIn...

Inplace Edit causes access violation in Delphi 2010
Hi there, the following problem occured with D2010 (the same code in D2007 is still in use an working well): in a component I use a TForm with a TMemo as an inplace editor. Everytime I try access propertys of the Memo I'll get an access violation Here's the code FMemoPopup:= TFInplaceMemo.Create(self); FMemoPopup.Parent:=nil; FMemoPopup.Visible:= false; //FMemoPopup.Memo1.Align:= alClient; //FMemoPopup.Memo1.OnKeyUp:= Memo_KeyUp; //FMemoPopup.Memo1.OnDblClick:= Memo_DblClick; Every of the 3 lines that are now commented cause the violation when uncommented....

JNI.pas verC gives access violation on new Delphi XE7
Hi, I'm working with the last version of the JNI.pas that I've found on the web : JNI_verC, and though it works correctly in Delphi7, it raises an access violation when : {code}Env^.CallVoidMethodA(Env, Obj, MethodID, ArgsToJValues(Args));{code} is called though I even tried to change the TJNIEnv.ArgsToJValues accordingly to this suggestion : http://delphi.cz/post/Jeste-jednou-Delphi-a-Java-tentokrat-v-XE2-64bit.aspx . Is there a way to Fix this access violation ? There can be a possible wrong argument conversion problem ? Here some snippets of involved code : {code} proce...

Using Delphi 7 and Delphi 2010
I had a project in Delphi 7. I worked on it in Delphi 2010. When I try to open the .dpr again in Delphi 7, the IDE toolbar widens across both monitors, and Delphi 7 locks up. It appears that Delphi 2010 modifies the .dpr in a way that makes Delphi 7 unable to open it again. All my forms & units appear to open fine in D7 after D2010, except for the warnings on the ExplicitHeight and ExplicitWidth properties being missing... I can easily recreate the .dpr, but is this expected behavior? Thanks. Tom Field wrote: > I had a project in Delphi 7. > > I worked o...

delphi Win32 using delphi .NET dll
Hi, I'm trying to use a delphi.NET dll in delphi.WIN32. I am currently using CodeGear Delphi 2007 with version2(base version) of .NET I can get the dll to import into the WIN32 application the only problem is when i include things such as: "using Classes,DateUtils, SysUtils" in the .NET dll the win32 application will instantly hang when any of the dll functions are called. Any help would be great thanks. Also I have tried this example and it also crashes for me? http://cc.embarcadero.com/Item/22688 -Braden I also found this.. "The problem is that, wehn you instal...

To use or not to use Delphi
Sadly, it seems to me that there is a sort of race between the two threads, for and against using Delphi in new projects, with more or less the same users posting in both threads. Arguments are fiercely debated in both camps. Borland had their own vision. As a community, now that Delphi has changed ownership I believe we should try to be more consistent, more clear, and more articulate in what we expect from Embercadero in terms of Delphi. We can contribute to keeping Delphi alive and moving in the right direction. "Laurent Cocea" schrieb: > Sadly, it seems to me that there ...

How to use a delphi XE3 obj file in delphi 2007?
Hi, I'm migrating an application from delphi 2007 to delphi XE3 and I would like to do it in several steps. To do this I need to use a part of my new code (XE3) in the current delphi 2007 application. So I want to use the .obj file from my XE3 file. I know I have to use the {$L 'Filename'} and I know that I have to declare the functions that I want to use in external in my D2007 project. I wanted to make an easy and simple example to see how it works with only 1 function 'hello world' compiled in obj with XE3 but I can't find the way to use it in D2007. In D200...

can i use delphi 2007 bpls in delphi 2009
can i use delphi 2007 bpls in delphi 2009 ? "Gaetan SIRY" skrev i meddelelsen news:8703@forums.codegear.com... > can i use delphi 2007 bpls in delphi 2009 ? No. -- Finn Tolderlund The compatiblity between D2006 and D2007 was unique. Normaly they can't be compatible because new version enhance/change the API. And D2009 defines String = Unicode where older version has String = Ansistring so D200x/Dx-BPL are 200% incompatible with D2009. ...

using lib .so in Delphi XE7
I needed a help, if possible ??? It is this: I have a routine written and compiled in C ++ that make data sync a bank with any SQL lite on Windows, one console TCP IP data exchange between environments. Routine name: libfastsync.so (This routine is the client of my console) Question: How do I incorporate this routine into the Delphi XE7 and use it in my application,,,, u have a sample outside call? I know it's possible,,, so,,, do not know how beginner stuff !! Would have an example of this call? Since already thank you Thank you for Remmy tip, but most have some doubts ...

Delphi and Delphi for .Net
It seems that Delphi for .Net is slower than Delphi Win32 native applicaiton. I would like to know is it true all .Net application is slower than Win32 native applicaiton or it is Delphi for .Net only. Your information is great appreciated, Inung On 2011-06-21 18:20:17 +0100, Inung Huang said: > It seems that Delphi for .Net is slower than Delphi Win32 native applicaiton. > I would like to know is it true all .Net application is slower than > Win32 native applicaiton or it is Delphi for .Net only. If you are only running the code in the application once then, yes, yo...

Access Violation When Starting Delphi
Irregularly, when starting the D7 IDE with still nothing but the D7 splash screen showing, I get 'Access Violation in vcl70.bpl' followed by the message 'Error reading EditWindow.Icon.Data. The window does not have scroll bars.' At the moment, I am working on a single project so always open the same one. I have zero 3rd party components registered in D7. What to make out of this? Thank you for your comments. Andreas Hi! Try starting your project with -np switch. Delphi will open with no project. > Vincent Bergeron wrote: > Try starting your project...

Delphi 2010 Access Violation
I have an application developed with delphi 2010 professional. Are there any tools in the IDE that will help me find an access violation that shows up, when the application closes? I have steppd through the code,but can' t locate anything. I am not for sure but I think a form may not be destroyed. TIA Jan B wrote: > I have an application developed with delphi 2010 professional. Are > there any tools in the IDE that will help me find an access violation > that shows up, when the application closes? I have steppd through > the code,but can' t locate anything. ...

Web resources about - Use of TBCDField in Aggregate causes access violation in Delphi XE7 - embarcadero.delphi.general

Resources last updated: 1/22/2016 2:39:05 PM