Home > Enterprise >  the insert parameter of a checkbox status in an insert query
the insert parameter of a checkbox status in an insert query

Time:10-23

How do I check the status of a checkbox (checked or not checked) on my Form and then pass it on to my SQL insert query?

I've got the parameter in my stored procedure:

@p6 bit

However, in Delphi is the problem :

DataModule7.SP_INSERT.ParamByName('p6').AsBoolean := cxCheckbox1.Properties; //???

Does someone know how to do this?

CodePudding user response:

What you need is

DataModule7.SP_INSERT.ParamByName('p6').AsBoolean := cxCheckbox1.Checked;

Assuming you are executing this code from the Form containing cxCheckBox1.

  • Related