Search the Community
Showing results for tags 'dbedit'.
Found 2 results
Refresh dbedit after insert
PenelopeSkye posted a topic in VCLLong story short: How can I refresh a dbedit box with data from a table I have just inserted data into? Long story long: My sql table and UI has fields for PresentationID, DesignID, StockID plus 5 other initially blank fields. With no input from the user I populate the PresentationID, DesignID, StockID fields in the database using values gotten from elsewhere in the application, the 5 fields are populated with null because they are not included in the insert (see code below). If I did include them they would be null anyway since I don't enter data into them until after the row is inserted with the 3 values. After I insert values into the database using the code below I am able to enter text in the other 5 fields or update the 3 fields but when I click on another tab in the application, and leave the tab I am on, the code written elsewhere that posts the data kicks in and attempts to update the database with the values any of the 8 fields. At that point I get the following Cannot insert the value NULL into column 'Presentation', table 'AdiMS2.dbo.ValuePackLinks'; column does not allow nulls. INSERT fails. because the application doesn't recognize the values just inserted for PresentationID, DesignID, StockID. If I leave the app and come back in the 3 fields are populated with data and the post works just fine with values from the 8 fields. How can I refresh a dbedit box with data from a table I have just inserted data into so that I can immediately start editing and not have to leave the app? Does that make sense? Thank you! PresentationID := dm.tb_dm_presentation_design_links.fieldbyname('presentation').asstring; DesignID := dm.tb_design_master.fieldbyname('design_id').asstring; StockID := dm.tb_design_master.fieldbyname('jmc_stock_num').asstring; q_InsValuePackLinks.SQL.Add ('insert into ValuePackLinks '); q_InsValuePackLinks.SQL.Add ('(Presentation,Design_id,Stock_pack)'); q_InsValuePackLinks.SQL.Add ('VALUES('+Quotedstr(PresentationID)+','+Quotedstr(DesignID)+','+Quotedstr(StockID)+')'); q_InsValuePackLinks.ExecSQL ;
Palette - Can't find "Data Controls"
PenelopeSkye posted a topic in FMXI have inherited a project. When I look in the palette I can't find 'Data Controls' to add a dbedit object. How do I add this category to the palette? I don't know what type of project it is, VCL, fire monkey etc..., if it makes a difference would you tell me how to verify? Thanks!