 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Valeria Garcia Guest
|
Posted: Thu Nov 20, 2003 8:17 pm Post subject: Re: Using Tablename property at runtime |
|
|
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 |
|
 |
|
|
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
|
|