I work on csharp application i have case need to update bit field with label control
.text so thatwhen assign value to label control it updated without single quotes
actually i need to store value with single quotes
label1.text="False"; update value but without single quotes
when updated value of bit field with value exist on label it not saved because
it give me syntax error
syntax error happen because False set as following :
update [dbo].[AccBranch] set savedata=false
so when save data is bit datatype on sql so that to assign value must be
savedata='false' not savedata=false
so that i need to have single quotes on value .
i also not need single quotes within update statement .
I need label control .text save value with single quotes meaning store 'False'
how to do that please ?
What I have tried:
label1.text='False';
it give me compile error
label1.text="False"
it saved without single quotes so nthat update give me
error synatx