You are not logged in.
Hello,
If i run a select query using LEFT JOIN in sqlite, the result value returned may have a null value, If there is no data in table b as below sql statement.
"SELECT a.name, b.desc from adb a LEFT JOIN bdb b ON a.key = b.key"When using TSqlRequest for this sql statement, it seems that the ACCESS-VIOLATION error occurs at stmt.step because of the null value.
According to Codex, in TSqlRequest.FieldUtf8 implementation as below:
P := sqlite3.column_text(Request, Col);
FastSetString(Result, P, StrLen(P));If the SQLite column value is NULL, sqlite3.column_text() can return nil, then StrLen(nil) will get AV.
Please let me know the solution.
Offline
Don't trust what the AI says.
Use the source, Luke!
StrLen(nil) always returns 0 by design.
0) don't loose time trusting sloppy LLM.
1) provide a minimum reproducible project.
2) put the stack trace as a picture or as a gist.
Offline