I'm implementing a conversion routine to normalize field representation.
I'm using ZEOS 7.0.0-dev
Delphi 2010
I've a simple case routine
formatDbFieldValue(XField: TField): String;
case XField.DataType of
ftTime : ....
....
ftString : REsult := XField.asString;
ftWideMemo:
Result := XField.asWideString;
end;
end;
when accessing ftMemo fields asWideString (but I tried also asString) I get an Access Violation Address 00000000
The debugger is not helping so much. Think I shall include more path to get deep inside the code of Zeos
So before starting this I'm asking if somebody have similar problems.
Thanks
Access violation ftMemo asWideString
Moderators: gto, EgonHugeist, olehs
- mdaems
- Zeos Project Manager
- Posts: 2766
- Joined: 20.09.2005, 15:28
- Location: Brussels, Belgium
- Contact:
Seems to me this is a TField issue, unless the TField component reads into zeoslib during the asWideString method.XField: TField
But the Address 0000000 looks strange. Are you sure the XField parameter points to a valid TField instance? eg. is the XField.Fieldname value accessible. Just try putting a Showmessage(XField.Fieldname) in your code before the case statement. Even if the dialog is empty, this should mean the XField is a real object instance.
In that case you may add the Delphi vcl and zeoslib sources to your search path to debug into the failing asWidstring call. (But I promise you : that's fun )
Mark
Yes
XField.FieldName is acessible, as I'm compiling a JSON structure so I need fieldname to use it as attribute name in the JSON object.
I've already added the ZoesLib source in the search library
And asWideString fails to create a DataStream object....
so far... so bad. I've not gone further in investigating the problem
XField.FieldName is acessible, as I'm compiling a JSON structure so I need fieldname to use it as attribute name in the JSON object.
I've already added the ZoesLib source in the search library
And asWideString fails to create a DataStream object....
so far... so bad. I've not gone further in investigating the problem
- mdaems
- Zeos Project Manager
- Posts: 2766
- Joined: 20.09.2005, 15:28
- Location: Brussels, Belgium
- Contact:
Does this mean it's a VCL error? Then you'll have to check with Borland what's wrong.And asWideString fails to create a DataStream object....
Or did you trace the asWideString into the VCL code until it calls the zeoslib code somewhere (eg for retrieving the data form the zeoslib buffers)?
I know, it's a hell of a job. What I usually do is adding the vcl code paths and the zeoslib paths to the search path and set the compiler output path to some directory in y project, so everything gets build from source without messing up the delphi installation. The I set a debug point on the bad call and step into the procedures until l find the 'bad behaving' code. Never did it with D2010, however as I'm not using that environment.
Mark
Sorry, I really made me misunderstood.
The DataStream is not created , but it is not a vcl error.
ZeosLib do NOT actively create the DatStream because some conditions are not met.
I've not investigated it at all, as I discovered other problems with ADO and I had to change to another environment (dbGO)
I've this investigation stowedaway in the wishes box... hope to be able to restart it, somewhere and sometime.
The DataStream is not created , but it is not a vcl error.
ZeosLib do NOT actively create the DatStream because some conditions are not met.
I've not investigated it at all, as I discovered other problems with ADO and I had to change to another environment (dbGO)
I've this investigation stowedaway in the wishes box... hope to be able to restart it, somewhere and sometime.