'Incompatible types 'string' and 'Tdbedit'' 
Author Message
 'Incompatible types 'string' and 'Tdbedit''

Hello,
I'm trying to use a dbedit box to insert records into a paradox table
It must also update a label on the form.
When I run the program I get
'Incompatible types  'string' and 'Tdbedit''
When the label's caption is being changed...
Heres the line of code.

Label1.caption:=vininsert;

This is when I get the error

What am I doing wrong?
Thanks
Phil



Wed, 18 Jun 1902 08:00:00 GMT  
 'Incompatible types 'string' and 'Tdbedit''

Quote:

>Hello,
>I'm trying to use a dbedit box to insert records into a paradox table
>It must also update a label on the form.
>When I run the program I get
>'Incompatible types  'string' and 'Tdbedit''
>When the label's caption is being changed...
>Heres the line of code.

>Label1.caption:=vininsert;

And vininsert is? If it is the TDBEdit, then the line should be
Label1.caption:=vininsert.text;

        -- Kirk



Wed, 18 Jun 1902 08:00:00 GMT  
 'Incompatible types 'string' and 'Tdbedit''

Label1.caption:=vininsert.text ;

The original statement assigned the entire tdbedit component to the
caption - you only want the text (or editText) property of the tdbedit to be
used in the caption.

Quote:

>Hello,
>I'm trying to use a dbedit box to insert records into a paradox table
>It must also update a label on the form.
>When I run the program I get
>'Incompatible types  'string' and 'Tdbedit''
> .....



Wed, 18 Jun 1902 08:00:00 GMT  
 'Incompatible types 'string' and 'Tdbedit''



Quote:
>Hello,
>I'm trying to use a dbedit box to insert records into a paradox table
>It must also update a label on the form.
>When I run the program I get
>'Incompatible types  'string' and 'Tdbedit''
>When the label's caption is being changed...
>Heres the line of code.

>Label1.caption:=vininsert;

>This is when I get the error

>What am I doing wrong?
>Thanks
>Phil

Try Label1.caption := vininsert.text;


Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. type field ''money''

2. IndexDefs.Add('Help','Please',[ixD2WorksGreat, ixD3Errors])

3. Need Gnu equivalent for type 'Registers'

4. EVariantError 'Invalid variant type conversion'

5. Replace 'keystack''

6. Don't trust in 'trunc'

7. Creating RunTime Fields: EDataBaseError 'Field 'Fieldname' is not of the expected type'

8. pascal 'real' data to vb 'double'

9. Add a Field 'User' or 'Value' with SQL

10. Problem: 'Table is read only' - Error when on 'select'

11. Do I Need a 'database' to create a 'table'?

12. Find '?' and 'fish', prog for newcomers

 

 
Powered by phpBB® Forum Software