DBComboBox.text POST problem (Delphi2K6)
Posted: 15.09.2006, 06:04
Hello all,
I have this strange problem, and it's driving me nuts.
I'm using a TDBComboBox in Delphi, MySQL 5, and the latest stable ZeosLib.
The drop down is pre-populated with static choices.
When the user leaves the combo box I apply formatting functions to the Text property.
These changes show, but once I MySQLQuery.Post they revert back to what they were before I applied my formatting.
Also, say the user hits "c" and it pulls up the first "C" match from the drop down. Say the first match is "Computer Lab", if they hit a lower case C, it shows as "computer Lab". So my Formatting fixes it, and it displays as "Computer Lab" when leaving the box, but it posts it as "computer Lab", and then the box updates from teh record and goes back to displaying "computer Lab".
I have a custom Save button, that checks the pirmary key, and then Posts the record. If I put the formatting procedures in there just before the post, it makes no difference and does the same thing.
I tried replacing my formatting procedures with a simple:
DBCombo.Text := 'foobar';
And it does the same thing, it changes whatever was typed into the box to "foobar", but on Post it reverts back to what it was before "foobar" was assigned.
My SQLQuery beforePost and afterPost events are set to do nothing but enable and disable certain buttons.
ANY ideas?? I'm stumped as to what I'm missing..
I have this strange problem, and it's driving me nuts.
I'm using a TDBComboBox in Delphi, MySQL 5, and the latest stable ZeosLib.
The drop down is pre-populated with static choices.
When the user leaves the combo box I apply formatting functions to the Text property.
These changes show, but once I MySQLQuery.Post they revert back to what they were before I applied my formatting.
Also, say the user hits "c" and it pulls up the first "C" match from the drop down. Say the first match is "Computer Lab", if they hit a lower case C, it shows as "computer Lab". So my Formatting fixes it, and it displays as "Computer Lab" when leaving the box, but it posts it as "computer Lab", and then the box updates from teh record and goes back to displaying "computer Lab".
I have a custom Save button, that checks the pirmary key, and then Posts the record. If I put the formatting procedures in there just before the post, it makes no difference and does the same thing.
I tried replacing my formatting procedures with a simple:
DBCombo.Text := 'foobar';
And it does the same thing, it changes whatever was typed into the box to "foobar", but on Post it reverts back to what it was before "foobar" was assigned.
My SQLQuery beforePost and afterPost events are set to do nothing but enable and disable certain buttons.
ANY ideas?? I'm stumped as to what I'm missing..