Access violation ftMemo asWideString

The alpha/beta tester's forum for ZeosLib 7.0.x series

Report problems concerning our Delphi 2009+ version and new Zeoslib 7.0 features here.

This is a forum that will be removed once the 7.X version goes into stable!!

Moderators: gto, EgonHugeist, olehs

Locked
glk70
Fresh Boarder
Fresh Boarder
Posts: 19
Joined: 08.03.2010, 17:58

Access violation ftMemo asWideString

Post by glk70 »

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
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

XField: TField
Seems to me this is a TField issue, unless the TField component reads into zeoslib during the asWideString method.
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
Image
glk70
Fresh Boarder
Fresh Boarder
Posts: 19
Joined: 08.03.2010, 17:58

Post by glk70 »

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
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

And asWideString fails to create a DataStream object....
Does this mean it's a VCL error? Then you'll have to check with Borland what's wrong.
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
Image
glk70
Fresh Boarder
Fresh Boarder
Posts: 19
Joined: 08.03.2010, 17:58

Post by glk70 »

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.
Locked