2

I am using vb.net sqlite.net and dblinq0.20.1 to search a sqlite table on a primary key field.

My code looks like this

Dim blb = (From d In db.Data Where d.UID = myuid Select d).Single

This returns the error "Coalesce used with type that cannot be null"

If I search on a nullable field it works fine.

Anyone come across this error before and throw any light on what the issue is?

1 Answer 1

1

This error message was a bit misleading. The field in question (the primary key for the table) was in fact nullable whereas it should not have been. I changed the field property to 'not null' and the linq query worked as expected.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.