Recent

Author Topic: TDBComboBox rejects the selected item from a predefined list  (Read 1025 times)

Hydexon

  • Full Member
  • ***
  • Posts: 170
Hi, again time to no see eh?

I'm trying to use an TDBComboBox for an String field which only can have three predefined strings added in the Items property at design-time, everything in the database works fine as intended, but when i select an item from the DBComboBox it bounces back to empty (if i want to add a new record) or the original one (if modifying an existing one) when you save it, it either uses the old one when modifying or Database error due the requested field value isn't supplied when adding a new record. The other db controls works as intended.
Lazarus 1.0.4 Stable - FPC 2.6.0 - gtk2 | Linux Mint 14 Nadia | GNOME Shell 3.6.2 - Awesome | Intel x86 | HP Mini 1020-LA Netbook (old)
Lazarus 2.0.2 Stable - FPC 3.0.2 - Windows | Lenovo IdeaPad Y

valdir.marcos

  • Hero Member
  • *****
  • Posts: 1106
Re: TDBComboBox rejects the selected item from a predefined list
« Reply #1 on: June 22, 2019, 06:27:39 pm »
Hi, again time to no see eh?

I'm trying to use an TDBComboBox for an String field which only can have three predefined strings added in the Items property at design-time, everything in the database works fine as intended, but when i select an item from the DBComboBox it bounces back to empty (if i want to add a new record) or the original one (if modifying an existing one) when you save it, it either uses the old one when modifying or Database error due the requested field value isn't supplied when adding a new record. The other db controls works as intended.
Could you provide a small sample project?

Hydexon

  • Full Member
  • ***
  • Posts: 170
Re: TDBComboBox rejects the selected item from a predefined list
« Reply #2 on: June 23, 2019, 04:54:18 am »
Could you provide a small sample project?

See attachment, you may need to setup the SQLite DLL path.
Lazarus 1.0.4 Stable - FPC 2.6.0 - gtk2 | Linux Mint 14 Nadia | GNOME Shell 3.6.2 - Awesome | Intel x86 | HP Mini 1020-LA Netbook (old)
Lazarus 2.0.2 Stable - FPC 3.0.2 - Windows | Lenovo IdeaPad Y

 

TinyPortal © 2005-2018