Recent

Author Topic: dbtext doesn't change values  (Read 2074 times)

Gebo

  • Jr. Member
  • **
  • Posts: 52
    • chahpander for lingeries
dbtext doesn't change values
« on: April 10, 2024, 03:42:59 pm »
I use dbtext but when I changed dbgrid selected row , dbtext doesn't change the text value.

note that I use zconnection and zquery.
« Last Edit: April 10, 2024, 03:46:00 pm by Gebo »
I like programming I begun by vb,vb.net,c# and finally free pascal and lazarus .I like martial arts sports and I am a kickboxer and made our team sport club called black eagle school I have a website for modern clothes..

dseligo

  • Hero Member
  • *****
  • Posts: 1500
Re: dbtext doesn't change values
« Reply #1 on: April 10, 2024, 03:58:23 pm »
I just tried and it changes value (if by 'text value' you mean Caption, which you see).

Maybe if you provide some more info. OS, Laz, FPC versions and bitness, what database you use, example project?

Gebo

  • Jr. Member
  • **
  • Posts: 52
    • chahpander for lingeries
Re: dbtext doesn't change values
« Reply #2 on: April 10, 2024, 04:03:44 pm »
I use win 10,mariadb database,lazarus 3.2 and fpc 3.2.2  .
I like programming I begun by vb,vb.net,c# and finally free pascal and lazarus .I like martial arts sports and I am a kickboxer and made our team sport club called black eagle school I have a website for modern clothes..

dseligo

  • Hero Member
  • *****
  • Posts: 1500
Re: dbtext doesn't change values
« Reply #3 on: April 10, 2024, 05:31:25 pm »
I use win 10,mariadb database,lazarus 3.2 and fpc 3.2.2  .

My setup is same, except I'm on W11.
Is ZEOS 7.2.14 or 8.0? I have 7.2.14.
Did you set DataSource and DataField properties of DBText correctly? Is DataSource of DBGrid and DBText same?
Try to make small test program with only DBGrid and DBText. If it still doesn't work post test project here.

Gebo

  • Jr. Member
  • **
  • Posts: 52
    • chahpander for lingeries
Re: dbtext doesn't change values
« Reply #4 on: April 10, 2024, 06:02:37 pm »
I uses 7.2.14 but i am upgrading to 8 now.
I like programming I begun by vb,vb.net,c# and finally free pascal and lazarus .I like martial arts sports and I am a kickboxer and made our team sport club called black eagle school I have a website for modern clothes..

Gebo

  • Jr. Member
  • **
  • Posts: 52
    • chahpander for lingeries
Re: dbtext doesn't change values
« Reply #5 on: April 10, 2024, 06:13:18 pm »
I have just upgraded to zeosdb 8 and the same problem
I like programming I begun by vb,vb.net,c# and finally free pascal and lazarus .I like martial arts sports and I am a kickboxer and made our team sport club called black eagle school I have a website for modern clothes..

dseligo

  • Hero Member
  • *****
  • Posts: 1500
Re: dbtext doesn't change values
« Reply #6 on: April 10, 2024, 06:59:52 pm »
I have just upgraded to zeosdb 8 and the same problem

What about rest of my post?
If you use DBEdit instead of DBText, does it work then?

Gebo

  • Jr. Member
  • **
  • Posts: 52
    • chahpander for lingeries
Re: dbtext doesn't change values
« Reply #7 on: April 10, 2024, 10:29:07 pm »
What about rest of my post?
If you use DBEdit instead of DBText, does it work then?
[/quote]

I used dbedit but the problem still exist.
I like programming I begun by vb,vb.net,c# and finally free pascal and lazarus .I like martial arts sports and I am a kickboxer and made our team sport club called black eagle school I have a website for modern clothes..

rvk

  • Hero Member
  • *****
  • Posts: 6704
Re: dbtext doesn't change values
« Reply #8 on: April 10, 2024, 10:36:38 pm »
Also... Please read the rest of that post...

[...]
Did you set DataSource and DataField properties of DBText correctly? Is DataSource of DBGrid and DBText same?
Try to make small test program with only DBGrid and DBText. If it still doesn't work post test project here.

Without you providing more information or test project, we can't help you.

Gebo

  • Jr. Member
  • **
  • Posts: 52
    • chahpander for lingeries
Re: dbtext doesn't change values
« Reply #9 on: April 11, 2024, 10:38:21 am »
Also... Please read the rest of that post...

[...]
Did you set DataSource and DataField properties of DBText correctly? Is DataSource of DBGrid and DBText same?
Try to make small test program with only DBGrid and DBText. If it still doesn't work post test project here.

Without you providing more information or test project, we can't help you.

Hi bro thank you for your attention .
I am trying to change the label caption while I change the pointer in dbgrid .
the label caption show the price of the product,but when I change the row selected in dbgrid nothing change in the label.
I tried with dbtext and dbedit but the same problem. they take first value of the price where pointer is then when I move the pointer the label caption or dbtext or dbedit nothing changed in them.
I like programming I begun by vb,vb.net,c# and finally free pascal and lazarus .I like martial arts sports and I am a kickboxer and made our team sport club called black eagle school I have a website for modern clothes..

rvk

  • Hero Member
  • *****
  • Posts: 6704
Re: dbtext doesn't change values
« Reply #10 on: April 11, 2024, 10:44:03 am »
I tried with dbtext and dbedit but the same problem. they take first value of the price where pointer is then when I move the pointer the label caption or dbtext or dbedit nothing changed in them.
We already said... create a small example project with just a dbgrid, db components and your dbedit or dbtext.
If it shows the same problem you can upload the source of that small project (zipped).
(If it doesn't... then there is something else in your code wrong)

Here TDBText and TDBEdit work perfect in my small test project.

Gebo

  • Jr. Member
  • **
  • Posts: 52
    • chahpander for lingeries
Re: dbtext doesn't change values
« Reply #11 on: April 11, 2024, 11:29:03 am »
thanks alot I have solved it,but there is another problem I use arabic language and arabic character appeare
as question marks on dbgrid like ???????.
I use zconnection 8 with charset utf8
I like programming I begun by vb,vb.net,c# and finally free pascal and lazarus .I like martial arts sports and I am a kickboxer and made our team sport club called black eagle school I have a website for modern clothes..

Gebo

  • Jr. Member
  • **
  • Posts: 52
    • chahpander for lingeries
Re: dbtext doesn't change values
« Reply #12 on: April 11, 2024, 11:32:47 am »
thanks I resolved the problems .
thank you all for your attention
I like programming I begun by vb,vb.net,c# and finally free pascal and lazarus .I like martial arts sports and I am a kickboxer and made our team sport club called black eagle school I have a website for modern clothes..

rvk

  • Hero Member
  • *****
  • Posts: 6704
Re: dbtext doesn't change values
« Reply #13 on: April 11, 2024, 11:37:24 am »
thanks I resolved the problems .
:)

 

TinyPortal © 2005-2018