P
Peter Carlson
I am building a sql update to access database with the following code
String sql = "Update Homes set "
+ "Appearance=?, L_Area=?, Beds=?, FacilityName=?,
[Full]=?, "
+ "L_Map=?, [Open AL]=?, [Open ALZ]=?, [Open B+C]=?,
[Payment Rating]=?, [Placement Rating]=?, "
+ "[Last Update By]=?, [Last Visit By]=?, Website=?,
[Public Notes]=?, [Private Notes]=?, Remarks=?"
+ " where ID=" + nHomeID;
OleDbCommand cmd = new OleDbCommand(sql, con);
cmd.Parameters.AddWithValue("@FacilityName", tbName.Text);
cmd.Parameters.AddWithValue("@Website", tbWebsite.Text);
... more AddWithValues...
cmd.ExecuteNonQuery();
somewhere along the way I have a value that is not matching error is:
Data Type Mismatch
when I run cmd.CommandText, I get the sql with the ? still in it. How
can I dump the actual sql so I can copy / paste into access to see what
field is giving me problems.
Peter
String sql = "Update Homes set "
+ "Appearance=?, L_Area=?, Beds=?, FacilityName=?,
[Full]=?, "
+ "L_Map=?, [Open AL]=?, [Open ALZ]=?, [Open B+C]=?,
[Payment Rating]=?, [Placement Rating]=?, "
+ "[Last Update By]=?, [Last Visit By]=?, Website=?,
[Public Notes]=?, [Private Notes]=?, Remarks=?"
+ " where ID=" + nHomeID;
OleDbCommand cmd = new OleDbCommand(sql, con);
cmd.Parameters.AddWithValue("@FacilityName", tbName.Text);
cmd.Parameters.AddWithValue("@Website", tbWebsite.Text);
... more AddWithValues...
cmd.ExecuteNonQuery();
somewhere along the way I have a value that is not matching error is:
Data Type Mismatch
when I run cmd.CommandText, I get the sql with the ? still in it. How
can I dump the actual sql so I can copy / paste into access to see what
field is giving me problems.
Peter