Closed GoogleCodeExporter closed 9 years ago
This is a weird one - it's actually not a SubSonic thing, try to do this with a
SqlCommand and see what happens :).
I'm working on something here...
Original comment by robcon...@gmail.com
on 9 Apr 2009 at 2:37
Can I suggest for your apps that you pass 'null'? I literally cannot find a way
around this - ADO is setting the command up to pass "null" without single
quotes
(which is what the DB requires) and I can't figure out a way around it.
I have to shelve this for now - and I hate to say it but I might suggest you
escape "null" to "'null'" - I tried this but it adds the quotes to the DB.
Original comment by robcon...@gmail.com
on 9 Apr 2009 at 2:41
The actual bug is not with:
string s = "\"null\"";
It is with:
string s = "null";
Original comment by jason.ke...@gmail.com
on 9 Apr 2009 at 2:44
Can you post the relevant code block and/or create a unit test that reveals the
ADO
problem? We could post that on stackoverflow.
Original comment by jason.ke...@gmail.com
on 9 Apr 2009 at 3:47
Right - no I get that. It's that we build a DbCommand up, add a parameter with
DbType.String, set it to "null", which gets executed somehow as "SET
column=NULL".
I've looked and looked - I'll keep looking but I can't figure this out!
resetting to Accepted so JK doesn't shoot me
Original comment by robcon...@gmail.com
on 9 Apr 2009 at 3:57
SqlDataProvider. Method AddParams. Found this:
//fix for NULLs as parameter values
if (param.ParameterValue == null || Utility.IsMatch
(param.ParameterValue.ToString(), "null"))
{
sqlParam.Value = DBNull.Value;
}
Original comment by jason.ke...@gmail.com
on 9 Apr 2009 at 4:05
I'm wrong - DOH! you found it :). I could not imagine this was in there. Oh
well...
Fixed with revision 515
Original comment by robcon...@gmail.com
on 9 Apr 2009 at 4:08
Original issue reported on code.google.com by
jason.ke...@gmail.com
on 22 Feb 2009 at 1:59