1
Vote

New-Item : Cannot bind argument to parameter 'TextField' because it is an empty string.

description

If a text field has a NOT NULL constraint on it, then psqlite won't be able to write an empty string "" to it.

Steps to reproduce problem:
  1. Create a table called TestTable that has a TEXT field called TextField which has a NOT NULL constraint on it.
  2. Do new-item db:\TestTable -TextField ""
  3. New-Item will throw an error "Cannot bind argument to parameter 'TextField' because it is an empty string."
This is incorrect behavior because an empty string is not the same things as a NULL string. It is possible to set NOT NULL text fields to "" via SQL.

comments