BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to show a Memo field ona DBGrid

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (dbExpress)
View previous topic :: View next topic  
Author Message
Daniel Baylon
Guest





PostPosted: Thu Jan 15, 2004 10:46 pm    Post subject: How to show a Memo field ona DBGrid Reply with quote




I'm using Delphi and Oracle 9i, use a query which calls an Oracle user defined function that returns a varchar2(50) value.

When Query is active, function field is TMemoField type (I don't know why), got a DBGrid linked to query, when application is running function field shows (MEMO} legend, I need that grid displays function returned data instead (MEMO}.

I appreciate some help.

Best Regards.
Back to top
Bob Swart
Guest





PostPosted: Fri Jan 16, 2004 7:08 am    Post subject: Re: How to show a Memo field ona DBGrid Reply with quote



Hi Daniel,

Quote:
When Query is active, function field is TMemoField type (I don't know
why), got a DBGrid linked to query, when application is running function
field shows (MEMO} legend,

That's a feature, probably protecting you from showing a potential large
amount of data inside the grid.

Quote:
I need that grid displays function returned data instead (MEMO}.

Right-click on your (client)dataset to start the Fields Editor, and add
all (persistent) fields. Then, select the memofield and implement the
onGetText event handler as follows:

Text := Field.AsString

This works for me ;-)

Groetjes,
Bob Swart (aka Dr.Bob - www.DrBob42.com)

--
Bob Swart Training & Consultancy (eBob42) Borland Technology Partner
webmaster UK Borland User Group (BUG) & DotNet Developers Group (DDG)

Back to top
Daniel Baylon
Guest





PostPosted: Fri Jan 16, 2004 4:38 pm    Post subject: Re: How to show a Memo field ona DBGrid Reply with quote




It works verry fine, thanks a lot.

Regards
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (dbExpress) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.