I am trying to execute an INSERT INTO query using .Net through the MySql/.NEt connector. The query makes uses of Parameters. It is rather simple:
INSERT INTO post (
ID, content, post_url, blogID, title, addedOn,
updatedDate, commentsFeedURL, active, viewCount,
commentCount, languageID, authorName, postDate,
posRating, negRating, adult)
VALUES(
@ID, @content, @post_url, @blogID, @title, @addedOn,
@updatedDate, @commentsFeedURL, @active, @viewCount,
@commentCount, @languageID, @authorName, @postDate,
@posRating, @negRating, @adult)
When I run it (with all parameters duly assigned) I get an error
"Column 'post_url' cannot be null"
But it is not Null. This is the value in the parameter post_url
And this is the code I am using to assign the parameters to the SQL Query
cmd.Parameters.AddWithValue("post_url", postOld.URL);
What could be the reason that I am getting this behavior?