PDS8475
Active member
- Joined
- Jun 25, 2019
- Messages
- 41
- Programming Experience
- Beginner
Hi I'm trying to pass a bool to a table in access amongst other values.
The bool is just set when the user clicks a button rather than from a checkbox.
The query works if I take the bool value out.
The code that I use to set and add as a parameter is:
I'm not sure how to set the parameter as true. As you can see I have tried setting a bool variable as true and passing it to the variable, but this didn't work
Any help would be much appreciated.
The bool is just set when the user clicks a button rather than from a checkbox.
The query works if I take the bool value out.
The code that I use to set and add as a parameter is:
C#:
bool s = true;
OleDbParameter opa = new OleDbParameter("@S", OleDbType.Boolean);
opa.Value = s;
cmdd.Parameters.Add(opa);
I'm not sure how to set the parameter as true. As you can see I have tried setting a bool variable as true and passing it to the variable, but this didn't work
Any help would be much appreciated.