If I have two fields DBLookUpComboBox in the same form, the fields in Tables A and B are recorded in Tab C as null.
Original Reporter info from Mantis: BraveDOG
-
Reporter name: Carlos Valente
Original Reporter info from Mantis: BraveDOG
- Reporter name: Carlos Valente
Description:
If I have two fields DBLookUpComboBox (linked tables A and B) in the same form, the fields in Tables A and B are recorded in Table C as NULL, even if I selected something in two DBLookUpComboBox.
Steps to reproduce:
Example
Table[A] SexType
+--------+-----------+
|Sex |Description|
+--------+-----------+
|Integer |VARCHAR(6) |
+--------+-----------+
|1 |Male |
|2 |female |
+--------+-----------+
Table[B] YesNo
+--------+-----------+
|Children|Description|
+--------+-----------+
|Integer |VARCHAR(3) |
+--------+-----------+
|1 |Yes |
|2 |No |
+--------+-----------+
Table[C] Polls
+-------+-----------+----+--------+---+
|RowID |Name |Sex |Children|Age|
+-------+-----------+----+--------+---+
|Integer|VARCHAR(10)|Int |Int |Int|
+-------+-----------+----+--------+---+
|1 |My Self |NULL|NULL |41 |
+-------+-----------+----+--------+---+
Additional information:
I'm working with Datasets (TDataSource, and TSQLQuery TMySQL50Connection)
To save'm using the code below:
if DM.tbPolls.State in [dsEdit,dsInsert] Then
Begin
Try
DM.tbPolls.Post;
DM.tbPolls.ApplyUpdates(-1);
DM.tbPolls.Close;
DM.tbPolls.Open;
MsgStatus(stbMensagens, 'Ok');
except
MsgStatus(stbMensagens, 'Nothing to do');
end;
end
Mantis conversion info:
- Mantis ID: 15950
- OS: Linux
- OS Build: Ubuntu 9.10
- Build: Lazarus 0.9.29 r23584
- Platform: i386
- Version: 2.3 (SVN)
- Monitored by: » BraveDOG (Carlos Valente)