Click here to Skip to main content
14,301,033 members
   

C#

 
GeneralRe: Data type mismatch in update query Pin
Member 1326108423-Jul-19 2:55
memberMember 1326108423-Jul-19 2:55 
GeneralRe: Data type mismatch in update query Pin
Eddy Vluggen23-Jul-19 3:00
mveEddy Vluggen23-Jul-19 3:00 
GeneralRe: Data type mismatch in update query Pin
Member 1326108423-Jul-19 3:31
memberMember 1326108423-Jul-19 3:31 
GeneralRe: Data type mismatch in update query Pin
Eddy Vluggen23-Jul-19 6:05
mveEddy Vluggen23-Jul-19 6:05 
GeneralRe: Data type mismatch in update query Pin
Member 1326108423-Jul-19 7:09
memberMember 1326108423-Jul-19 7:09 
GeneralRe: Data type mismatch in update query Pin
Member 1326108423-Jul-19 7:48
memberMember 1326108423-Jul-19 7:48 
GeneralRe: Data type mismatch in update query Pin
Eddy Vluggen24-Jul-19 0:10
mveEddy Vluggen24-Jul-19 0:10 
AnswerRe: Data type mismatch in update query Pin
Luc Pattyn23-Jul-19 7:44
professionalLuc Pattyn23-Jul-19 7:44 
Hi,

0. Welcome to (C#) programming.

1. Your piecemeal reporting makes it very difficult to get an overall picture of what is going on, I had to copy each of your messages into a single file to understand and check it somewhat...

2. MessageBoxes aren't very good for debugging, I much prefer logging (to a file).
You can read about it here: Article: A simple logging scheme[^] .

When you write an Exception.ToString() result to a file, you can look at it at your leasure; and you can copy and paste all or parts of it here.

3. From Google "0x80040e10":

OleDbException (0x80040e10): No value given for one or more required parameters.

4. Some databases know about booleans, and allow them to have either two (true/false) or three (true/false/unknown) values. This is a probable cause for problems.
My guess: it would probably be very wise to tell your database what default value you want (either true or false, not unknown/null).
This may be sufficient for your code to start working (I mean without exception, not necessarily correctly).

5.
You are probably right that a boolean is the culprit, and your current attempt uses five boolean fields; fixing one won't help a bit. If something is wrong with one of them, the same probably applies to all of them. Hence my urgent advice:
- create a small table with only one number and one bool;
- use it to get successful INSERT and UPDATE operations, so you find out how to do that;
- only then attempt your complex table with real fields and data.

In general: try walking before running.

6. your subject line refers to the update query, however your messages seem to discuss inserts all the time??

[ADDED LATER]

7. IMO you need an explicit three-line approach, something like:
OleDbParameter parameter = new OleDbParameter("@r", OleDbType.Boolean);
parameter.Value = myCheckBox.Checked;
cmd.Parameters.Add(parameter);


Good luck,

Smile | :)
Luc Pattyn [My Articles] Nil Volentibus Arduum


modified 23-Jul-19 14:13pm.

QuestionThis is a style question regarding partial classes Pin
honey the codewitch20-Jul-19 10:40
memberhoney the codewitch20-Jul-19 10:40 
AnswerRe: This is a style question regarding partial classes Pin
BillWoodruff20-Jul-19 11:04
mveBillWoodruff20-Jul-19 11:04 
GeneralRe: This is a style question regarding partial classes Pin
honey the codewitch20-Jul-19 11:07
memberhoney the codewitch20-Jul-19 11:07 
GeneralRe: This is a style question regarding partial classes Pin
BillWoodruff20-Jul-19 17:53
mveBillWoodruff20-Jul-19 17:53 
GeneralRe: This is a style question regarding partial classes Pin
honey the codewitch20-Jul-19 18:10
memberhoney the codewitch20-Jul-19 18:10 
GeneralRe: This is a style question regarding partial classes Pin
#realJSOP21-Jul-19 3:35
mve#realJSOP21-Jul-19 3:35 
AnswerRe: This is a style question regarding partial classes Pin
Bernhard Hiller21-Jul-19 20:54
memberBernhard Hiller21-Jul-19 20:54 
GeneralRe: This is a style question regarding partial classes Pin
honey the codewitch21-Jul-19 21:05
memberhoney the codewitch21-Jul-19 21:05 
GeneralRe: This is a style question regarding partial classes Pin
Bernhard Hiller21-Jul-19 21:35
memberBernhard Hiller21-Jul-19 21:35 
GeneralRe: This is a style question regarding partial classes Pin
honey the codewitch21-Jul-19 21:40
memberhoney the codewitch21-Jul-19 21:40 
Questionhow to read data type in excel Pin
rs1919-Jul-19 6:54
memberrs1919-Jul-19 6:54 
AnswerRe: C# Pin
Dave Kreskowiak19-Jul-19 8:14
mveDave Kreskowiak19-Jul-19 8:14 
GeneralRe: C# Pin
rs1919-Jul-19 9:38
memberrs1919-Jul-19 9:38 
GeneralRe: C# Pin
Dave Kreskowiak19-Jul-19 9:49
mveDave Kreskowiak19-Jul-19 9:49 
GeneralRe: C# Pin
BillWoodruff20-Jul-19 6:41
mveBillWoodruff20-Jul-19 6:41 
GeneralRe: C# Pin
Dave Kreskowiak20-Jul-19 13:30
mveDave Kreskowiak20-Jul-19 13:30 
GeneralRe: C# Pin
BillWoodruff20-Jul-19 17:59
mveBillWoodruff20-Jul-19 17:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.