Update released.
Passing vbNullString to .SetParameterValue no longer binds a SQL NULL in a SQLiteCommand or SQLiteCursor class.
The change in code is as following:
(from)
(to)Code:Result = stub_sqlite3_bind_text16(PropHandle, Index, StrPtr(Value), -1, SQLITE_TRANSIENT)
Because if StrPtr(Value) is a NULL pointer then sqlite3 does not bind an empty string but instead an SQL NULL, which is wrong.Code:If StrPtr(Value) <> NULL_PTR Then Result = stub_sqlite3_bind_text16(PropHandle, Index, StrPtr(Value), -1, SQLITE_TRANSIENT) Else Result = stub_sqlite3_bind_text16(PropHandle, Index, StrPtr(""), 0, SQLITE_TRANSIENT) End If
A vbNullString from a SELECT '' should bind an empty string (vartype vbString) instead SQL NULL when passing to .SetParameterValue.




Reply With Quote