B
Boris Zakharin
I have a table (jobs) where a field (email) is defined as varchar(50) and
can be set to null. How do I do that? For example, I have an OleDbCommand
called cmdSub and I perform the following:
cmdSub.CommandText =
"INSERT INTO jobs " +
"([Company Name], [Position Title], [Position Contact Information],
[Position Description], discipline_id, City, state_id, posted, email) " +
"VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?)\n";
And then for the last parameter do
cmdSub.Parameters.Add("email", DBNull.Value);
But I end up with a field filled with spaces. What am I doing wrong?
can be set to null. How do I do that? For example, I have an OleDbCommand
called cmdSub and I perform the following:
cmdSub.CommandText =
"INSERT INTO jobs " +
"([Company Name], [Position Title], [Position Contact Information],
[Position Description], discipline_id, City, state_id, posted, email) " +
"VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?)\n";
And then for the last parameter do
cmdSub.Parameters.Add("email", DBNull.Value);
But I end up with a field filled with spaces. What am I doing wrong?