I am trying to debug some classic ASP code and the app keeps breaking on an insert statement. The backend is in SQL
The statement looks something like this:
insert into tableX (id, fo, ao) values (12, '', 'ab')
in tableX both fo and ao are set to allow null values.
fo is a foreign key pointing to the foTable (look up table)
I guess it’s not liking the single quotes? How else do I go about this in classic asp?
The error I’m getting is:
The INSERT statement conflicted with the FOREIGN KEY constraint
“FK_tableX_FO”. The conflict occurred in database “tableX”, table
“dbo.FIELD_OFFICE”, column ‘FO’.
I also want to add that this is a process of migrating from Oracle. Does anyone know if Oracle treats ” as nulls, which is why I’m now getting an error in SQL?
An empty string is not a null value. You need to call it like this
Alternatively