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 

Re: Using Tablename property at runtime

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi As400
View previous topic :: View next topic  
Author Message
Valeria Garcia
Guest





PostPosted: Thu Nov 20, 2003 8:17 pm    Post subject: Re: Using Tablename property at runtime Reply with quote



Hi,

To solve your second problem, try the property FieldByName (or GetByFieldName depending on the component your using) of the table
component to acess the content of a field. You'll only need to know
the name of the field.

It'll be like: " fDatamodule.CUST.FieldByName('field1').value = 'xyz' "

Valeria



"Guillaume Juneau" <ephraels (AT) hotmail (DOT) com> escreveu na mensagem news:3b3b49b1$1_2 (AT) dnews (DOT) ..

- Second problem : "Ok then I'll set the tablename at runtime". But then how can I access my fields' value ?
i.e. I want to check the value of field1 of my new table (CUST). Syntax : if fDatamodule.CUSTfield1.value = 'xyz'.
Since the tablename property of CUST is set at runtime (in the DatamoduleCreate procedure), the compiler won't recognize
field1."Undeclared identifier : CUSTfield1"

If anyone out there can answer any of these 2 questions please do so.

Sincerly yours.


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