I'm using ASP.NET with a Microsoft Access 2003 database. In trying to pass values to a parameterized query, I get the following error:
System.Data.Oledb.OledbException: Parameter [@ParameterName1] has no default value.
The underlying query looks something like this:
UPDATE TableName
SET field1=[@ParameterName1],
SET field2=[@ParameterName2]
WHERE id=[@ID]
Field1 is a text field. In this particular instance, I'm passing "" as the value for @ParameterName1. I've tried String.Empty, and "''" but it actually inserts two single quotes, not an empty string. Ideas? I'd prefer not inserting a space, or some other type of "rig.
System.Data.Oledb.OledbException: Parameter [@ParameterName1] has no default value.
The underlying query looks something like this:
UPDATE TableName
SET field1=[@ParameterName1],
SET field2=[@ParameterName2]
WHERE id=[@ID]
Field1 is a text field. In this particular instance, I'm passing "" as the value for @ParameterName1. I've tried String.Empty, and "''" but it actually inserts two single quotes, not an empty string. Ideas? I'd prefer not inserting a space, or some other type of "rig.