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 

field data assignment on a record

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi OLE Automation
View previous topic :: View next topic  
Author Message
Dan Roy
Guest





PostPosted: Mon Jan 17, 2005 9:35 pm    Post subject: field data assignment on a record Reply with quote



I have developed an application which reads Microsoft Project files
using OLE via the MS Project Type Library. In MS Project, data for a
task is stored in data segments. There are other segments which connect
to the task segment via links in the task data segment.

The task segment is made up of about 100 fields, with links
interspersed throughout. When you want to retrieve data from a
particular field, you request a data retrieval of the entire task
segment by using a task ID. That single retreival will contain all data
from all segments related to that task id. To extract a particular
field, you would assign the value for that field to a local variable,
such as

var task : Olevariant;
text1 :string;
ID : integer;
comboread :string;

begin
id := 70;
comboread := combobox1.items.selected; // what I want to
do
task := FMSProject.gettask(ID); // retrieve
all segments for a particular task ID
text1 := task.text1;
// typical way to retrieve data for a particular field
label1.caption := text1; //
show the result in a label
end;

In my application, I do not know which text field I will
need until runtime. Text field run from text1 through text30. The
source for a particular text field to be retrieved is a drop-down
combobox, which can be re-defined at runtime by the user to be a
different text field.

I want to be able to read the combobox to read the combobox
selected field and substitute it in the read function above; such as

text1 := task +'.'+comboread;

Thanks

Dan Roy

Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi OLE Automation 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.