Quote:
|
"INSERT INTO pictures values('" & txtAngle.text & "', & cmd.FileToBLOB(" AppPath " & "\" & '" & txtAngle.text & "') &")"
|
Compare your failing command string (above) with the one I posted earlier that does work (below).
Quote:
|
"INSERT INTO pictures values('" & txtAngle.Text & "'," & cmd.FileToBLOB(AppPath & "\" & txtAngle.Text) & ")"
|
Your present problems are with the filename parameter of cmd.FileToBLOB(...).
1) You are quoting AppPath as a string literal so it will not be evaluated correctly. Also in a previous post I said
Quote:
|
the single quotes are not needed in a parameter to FileToBlob
|
2) You are trying to put add these unnecessary single quotes around the filename and are producing a string that doesn't parse correctly.
SQLlite needs literal strings, like a filename, to be quoted with single quotes. The values(....) bit of the statement is executed by the SQLlite engine and so needs those single quotes. The cmd.FileToBLOB(...) bit of the statement is executed by B4PPC while it is building the string for cmd.commandText and so needs either a string literal quoted by double quotes or (as in this case) a string expression that evaluates to a valid path.