Hi James, > When users are adding in data to my main table and to the linked tables > everything is fine. When they then try to add in a record to child > table the insert fails on the post event. The key field is called > "PROPOSAL_NB" and it is defined as char (5) on the server.
So on the server it is a field padded with spaces to make it exactly 5 long. > failing. The length of the data in the "PROPOSAL_NB" field in the child > table is 2. The length of the data in the "PROPOSAL_NB" field in the > parent table is 5. I am thinking that because of the difference in the > data length the post is failing since the key fields do not match. That could be. I think that an UPDATE or INSERT query is generated, with a WHERE clause and the key field of 2 characters specified in that WHERE clause (where a key field of 5 characters is needed to find the actual parent)... > Does anyone have any suggestions on how this can be resolved? You could change the field on the server to be of type VARCHAR so no padding spaces are used. Or you could change the field to a numerical field like integer. > James D. Stewart Groetjes, Bob Swart -- Bob Swart Training & Consultancy (eBob42.com) Forever Loyal to Delphi Blog: http://www.drbob42.com/blog - RSS: http://drbob42.com/weblog.xml Delphi 2006 Courseware PDF manuals at http://www.eBob42.com/courseware _______________________________________________ Delphi-DB mailing list Delphi-DB@elists.org http://www.elists.org/mailman/listinfo/delphi-db